我在 Wordpress 自定义主题中做了一个两层导航。它工作得很好,但有谁知道是否可以手动更改它的顺序?
这是我的自定义标头中的代码:
<div id="secNav">
<?php if($post->post_parent)
$children = wp_list_pages("title_li=&child_of=".$post->post_parent."&echo=0"); else
$children = wp_list_pages("title_li=&child_of=".$post->ID."&echo=0");
if ($children && is_page()) { ?>
<ul id="subnav">
<span class="subDescript"><?php echo $parent_title = get_the_title($post->post_parent); ?> Section:</span>
<?php echo $children; ?>
</ul>
<?php } else { ?>
<?php } ?>
</div>