• fanuv24

    (@fanuv24)


    On this [url=http://www.byron-harvey.com/bykota/]static page[/url], I want to have an index/contents of all the sub-pages in this section.

    I have been doing this manually, using an unordered list, and each week just adding a new list item. (top list on my page)

    Then I read in the [url=http://codex.wordpress.org/Template_Tags/wp_list_pages]codex[/url] that I can have this all done automatically by using a template tag. (bottom list on my page)

    Trouble is I can’t seem to get the arguments to work together to produce what I need.

    Here is what I am currently using:
    wp_list_pages(‘sort_column=menu_order&child_of=170&title_li = ‘); `

    What I am after is a list of all sub pages of BYKOTA (child_of) in the order I add them to the site (menu_order) with no other pages or headings.

    I’ve tried the arguments in several different orders, and I can’t seem to get it to produce what I need.

    Can anyone offer any advice on how I might accomplish this?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Avenir

    (@avenir)

    wp_list_pages('sort_column=menu_order&child_of=170&title_li = ');

    If that’s what you’re using exactly, the only problem that I can see is that you have a space between the title_li and the equals sign. The space after the equals is OK, but before is not. And if you built this tag straight from the Codex page on it, this should be your only problem.
    http://codex.wordpress.org/Template_Tags/wp_list_pages

    Thread Starter fanuv24

    (@fanuv24)

    I hadn’t spotted that, but in any case, I just corrected it, and I’m still getting a listing of ALL pages, as well as a header.

    I tried putting the child_of argument first, and that gives me the formating that I am looking for, but it completely ignores the sort_column argument, resulting in a completely jumbled order for the pages.

    Thread Starter fanuv24

    (@fanuv24)

    Since I am using 3 arguments, is that possibly the problem? I am just trying to think of anything that might possibly be the culprit here.

    (Of course, I need all 3 arguments, so if that were to be the problem, I’d have to figure out how to work around that.>

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to use wp_list_pages?’ is closed to new replies.