Support » Fixing WordPress » Using Pages links for navigation

  • Resolved ShizzlePDX503


    I am using a customized version of the juicy-1.0 theme for wordpress and I changed the header to not display the pages and instead put this in my sidebar via:

       <ul><li class="page_item">
       <a href="<?php bloginfo('url'); ?>/"><?php _e('Home'); ?></a></li>
       <?php wp_list_pages('title_li=' . __('')); ?></ul>

    I am wondering how can I make it so that it doesn’t display them in what seems to be alphabetical order. Instead I would like them to be display in post id order so that I can put them in a specific order that is to my liking.

    I haven’t used wordpress as my site content before but other than this small thing I really like using wp rather then the phpnuke stuff that I was using prior

    Thanks for the help!

Viewing 4 replies - 1 through 4 (of 4 total)
  • I think you should use the get_pages() function to retrieve pages by id.

    alright so I took an idea from that plugin. I tried the plugin first then I found another way of doing the same thing. You still have to use the order pages to put them in order or what I did was use the database to do the same thing. then I put this code in the sidebar:

    <?php wp_list_pages("title_li=&depth=1&sort_column=menu_order");?>

    now if I could figure out how to display the sub pages on the parent page. Like how would I go about displaying the links to sub pages on the parent page?

    This, I believe, is how you do that:

    global $wp_query;
    if( empty($wp_query->post->post_parent) ) {
    $parent = $wp_query->post->ID;
    } else {
    $parent = $wp_query->post->post_parent;
    wp_list_pages("title_li=<h2>IN THIS SECTION</h2>&child_of=$parent&sort_column=menu_order&show_date=modified&date_format=$date_format"); ?>
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Using Pages links for navigation’ is closed to new replies.