WordPress.org

Ready to get started?Download WordPress

Forums

DIsplay child navigation within child page (2 posts)

  1. Adam Huxtable
    Member
    Posted 2 years ago #

    Hey, I currently have a navigation bar displaying all the children of that specific page using the following snippet

    <div id="sub_nav_del">
                        <h4>Take a seat</h4>
                        <?php
                        $pages = get_pages('child_of='.$post->ID.'&sort_column=menu_order');
                        $count = 0;
                        foreach($pages as $page)
                        { ?>
    
                        <ul>
                            <li>
                            <h5 class="del">
                                <a href="<?php echo get_page_link($page->ID) ?>"><?php echo $page->post_title ?></a>
                            </h5>
                            </li>
                            </ul>
                        <?php
                        }
                        ?>

    However I would like the navigation to still be displayed if I am on one of the child pages.

  2. esmi
    Forum Moderator
    Posted 2 years ago #

    Have a look at some of the solutions in this Codex section.

Topic Closed

This topic has been closed to new replies.

About this Topic