WordPress.org

Ready to get started?Download WordPress

Forums

wp_list_pages include doesn't work (3 posts)

  1. Tereno
    Member
    Posted 7 years ago #

    Hi there, I am using wp_list_pages but I only want to include certain pages. Here's what I did:

    wp_list_pages('include=2,3,6&title_li= ')

    but that doesn't work. Strange thing is that exclude works perfectly fine.

  2. rudolf45
    Member
    Posted 7 years ago #

    I suspect the "include" works only on the 2.1.x branch and you say you are using 2.0.x.
    (I might be wrong, of course)

  3. ditdotdat
    Member
    Posted 7 years ago #

    I am using 2.1.3 and the include option of wp_list_pages has a bug in it. It will only list sub-pages if you have also asked it to list the parent pages of those sub-pages. In other words if page #1 is the parent of page #2 and you type wp_list_pages("title_li=&depth=0&include=2") you will get nothing but if you type wp_list_pages("title_li=&depth=0&include=1,2") then you'll get both of them.

Topic Closed

This topic has been closed to new replies.

About this Topic