Wordpress Menu item

Posted by kwek-kwek on Stack Overflow See other posts from Stack Overflow or by kwek-kwek
Published on 2010-05-11T18:41:23Z Indexed on 2010/05/11 18:44 UTC
Read the original article Hit count: 114

Filed under:
|

I have a main page that has a children item. Now my question is, is it possible to have the Main page link directly to the children item in it? E.g.

-Main Page(links to Page 2)

---Page 2

Here is my code:

<div id="MainNav">
<ul>
<?php wp_list_pages('exclude=3&sort_column=menu_order&title_li=&depth=1'); ?>
</ul>
</div>
<div id="leftCol">
<?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) { ?>
<ul>
<?php echo $children; ?>
</ul>
<?php } else { ?>
<?php } ?>
</div>

© Stack Overflow or respective owner

Related posts about Wordpress

Related posts about php