WordPress.org

Forums

[resolved] Displaying Child Pages - 1 is randomly omitted? (3 posts)

  1. AngstGoddess003
    Member
    Posted 4 years ago #

    I did this: http://codex.wordpress.org/Function_Reference/get_pages#Displaying_Child_pages_of_the_current_page_in_post_format

    I didn't modify that snippet at all, it's an exact C/P.

    It's always worked for me before (I have multiple sites), but for some reason on this particular one, it's omitting a child page? I can't find any rhyme or reason to it. It's the first child page I created out of 3. The other 2 display fine. Furthermore, the child page is displayed properly in the dropdown menu.

    It didn't work when I had no page order associated, and it also doesn't work when I do. It's a little weird.

    My hierarchy goes like:

    Classes
    -For Kids (Page to display children on)
    -Mommy and Me (doesn't work)
    -Art classes (works)
    -Drawing classes (works)

    Again, it works fine in my dropdown hierarchy (default Twenty-ten theme), so I'm at a loss.

    Any ideas? Thanks a bunch in advance. It's making me like this: >:(

  2. AngstGoddess003
    Member
    Posted 4 years ago #

    Hm, the formatting messed up my hierarchy.

    Classes
    --For Kids (Page to display children on)
    -----Mommy and Me (doesn't work)
    -----Art classes (works)
    -----Drawing classes (works)

  3. AngstGoddess003
    Member
    Posted 4 years ago #

    Nevermind. It was this part of the code:

    if($count >= 2)
    			break;

    It only shows the 2 most recent. I just deleted this conditional, and it works a-okay.

Topic Closed

This topic has been closed to new replies.

About this Topic