• I have some pages that have subpages and I want to show links to the suppages on those in a (good looking) div. BUT(!) I don’t want the div to show on those pages that doesn’t have subpages.

    I would like to think that it could be easily done if there just were a conditional tag like “is_parent”.

    Something like:

    <?php
    if(is_parent()){
    ?>
    <div id="goodlooking">
    <?php
    wp_list_pages()?>
    
    </div>
    <?php
    }
    ?>

    I hope you understand what I’m after.
    Happy for help.

Viewing 16 replies (of 16 total)
  • I am having some real problems with this. I can display sub-pages, but what I am trying to do is this:

    don’t display parent pages
    if page is sub-page but also has child pages, don’t display anything
    if page is sub-page but has no children, display it’s siblings

    Ultimately what I’m trying to achieve is to only show a pages siblings if it is the bottom level page.

    IE
    Home > about > about me
    Home > about > about my company

    Home should display no links
    Home > about should show no links

    Home > about > about me should show about me & about my company
    Home > about > about my company should show about me & about my company

    Any help would be greatly appreciated!

Viewing 16 replies (of 16 total)
  • The topic ‘If (this page has subpages) then’ is closed to new replies.