2013-02-14 84 views
0

我有一個wordpress網站,我需要將圖像添加到每個標題的末尾。問題是,這些都是小部件,所有文本都被wordpress中的小部件所取代。有沒有一種方法可以將圖像硬編碼到標題的末尾,以便它不會被刪除?如何將圖像添加到標題的末尾?

<div class="grid_4 widget"> 
<?php if (!function_exists('dynamic_sidebar') || !dynamic_sidebar('Footer 1')) : ?> 
<h2 class="beeh2">Widgetized Area 1</h2> 
<p>Go to Appearance - Widgets section to overwrite this section. Use any widgets that fits you best. This is called <strong>Bottom Left</strong>.</p> 
<?php endif; ?> 
<div class="clear"></div> 
</div> 

<div class="grid_4 widget"> 
<?php if (!function_exists('dynamic_sidebar') || !dynamic_sidebar('Footer 2')) : ?> 
<h2 class="beeh2">Widgetized Area 2</h2> 
<p>Go to Appearance - Widgets section to overwrite this section. Use any widgets that fits you best. This is called <strong>Bottom Middle</strong>.</p> 
<?php endif; ?> 
<div class="clear"></div> 

我也注意到我創建了H2類也不是那裏,當我檢查的網站。這似乎也被覆蓋。

回答

0

在你的functions.php文件(或包含的文件)裏你應該看到「register_sidebar」。頁腳1和頁腳2是自定義側邊欄,可能會覆蓋您在小部件中放置的代碼。尋找下面的代碼。

register_sidebar(array(
    'name'   => 'Footer 1', 
    'id'   => 'footer-1', 
    'before_widget' => '', 
    'after_widget' => '', 
    'before_title' => '', 
    'after_title' => '', 
)); 

'before_title'和'after_title可能包含您的h2。使用html,你可以在'after_title'中添加你的圖片。

希望有幫助!