2013-02-14 95 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'中添加你的图片。

希望有帮助!

相关问题