从MG12哪里学到的,写到这里来做个备忘,免得以后用的时候给忘了。
请在 sidebar.php 中找到你要处理那段代码.
在其前加: <?php if(is_home()) : ?>
在其后加: <?php endif; ?>
如:
<?php if(is_home()) : ?>
<!– blogroll –>
<li class=”widget”>
<h3>Blogroll</h3>
<ul>
<?php db_list_bookmarks(‘title_li=&categorize=0&orderby=rand&limit=10′); ?>
</ul>
</li>
<?php endif; ?>