您只需修改第一部分,如下所示:
<ul id="nav" class="clearfloat">
<li class="cat-item"><a href="<?php echo get_option(\'home\'); ?>/" class="on"><?php echo get_option(\'blogname\'); ?></a>
<ul class="children">
<?php wp_list_categories(\'orderby=name&title_li=\');
$this_category = get_category($cat);
if (get_category_children($this_category->cat_ID) != "") {
echo "<ul>";
wp_list_categories(\'orderby=id&show_count=0&title_li=
&use_desc_for_title=1&child_of=\'.$this_category->cat_ID);
echo "</ul>";
}
?>
</ul>
</li>
<?php wp_list_pages(\'title_li=\'); ?>
</ul>
当您将光标移到将作为菜单第一项的博客名称上时,将显示此菜单。如果你想显示“主页”而不是博客名称,只需替换
<?php echo get_option(\'blogname\'); ?>
与
Home
如果您不想显示在菜单中,而想显示在博客页面的徽标中,只需将菜单代码保留为wordpress中的原始代码,并用以下代码替换要添加菜单的链接的代码:
<ul id="nav" class="clearfloat">
<li class="cat-item"><a href="<put here the old reference of the link you are substituting>/" class="on"><put here the old content (maybe an image?, everything you found between the a>xxx<\\a> tags) of the link you are substituting></a>
<ul class="children">
<?php wp_list_categories(\'orderby=name&title_li=\');
$this_category = get_category($cat);
if (get_category_children($this_category->cat_ID) != "") {
echo "<ul>";
wp_list_categories(\'orderby=id&show_count=0&title_li=
&use_desc_for_title=1&child_of=\'.$this_category->cat_ID);
echo "</ul>";
}
?>
</ul>
</li>
</ul>
希望这有帮助,Marco