Forums

Display order is wrong... (4 posts)

  1. rforster
    Member
    Posted 3 years ago #

    hi everyone,

    I'm using a them called revolution and it has my pages listed across the top. They are also listed in one of the columns and the list is different. I went into the header file for the theme and found:

    <li><a>">Home</a></li>
    			<?php wp_list_pages('title_li=&depth=2&sort_column=menu_order'); ?>

    The first thing to note here is that links to the pages are in this order:
    HOME ABOUT CONTACT LINKS BOOKS

    The side bar has them in alpha sort. Also there is a page I made called events that is not in the header but is in the sidebar.
    I looked at the source from my page and the contacts links starts with:
    <li class="page_item page-item-5">
    whereas the Events page that doesn't show has a 375 instead of 5. The order of the link list is from the page ID.

    Is there a way to make is sort alpha in the header after HOME?

  2. MichaelH
    Volunteer
    Posted 3 years ago #

    Instead of 'menu_order' use the sort_column=post_title parameter with the template tag, wp_list_pages().

  3. rforster
    Member
    Posted 3 years ago #

    Wow thanks! I read that page and someday my site will have more pages than categories but maybe only 5 that I would want in the header. So I made that line red:

    a href="<?php echo get_settings('home'); ?>">Home
    <?php wp_list_pages('include=146,5,7,180&title_li'); ?>

    I'm still a bit confused about the title_li and it's purpose. It pulls the style info from another template?

    The example is :
    wp_list_pages('include=5,9,23&title_li=<h2>' . __('Poetry') . '</h2>' ); ?>

    I read this as having my list of pages followed by a level 2 header Poetry. I could see doing the h2 Poetry first and then the page ID's of poetry categories. Just curious.

    Anyway, thx for the help!

  4. MichaelH
    Volunteer
    Posted 3 years ago #

    I believe the title would be displayed first. Look at wp-content/themes/default/sidebar.php and how the WordPress Default 1.6 theme uses that.

    The position (before, or after the include=5,9,23) of the title_li specification in your parameter list has no impact on the actual display of the title.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.