• Resolved tom23

    (@tom23)


    I tried to change the order of Pages on my blog with certain plugins but it doesnt work.

    Also – trying to set the page order in Admin panel doesnt have any effect.

    Is it possible to change it somewhere in php admin panel?

Viewing 8 replies - 1 through 8 (of 8 total)
  • in the query change the orderby to you preferance

    As suggested by nsathees, the template tag, wp_list_pages(), offers the sort_column=menu_order argument:

    Here’s an example from the wp_list_pages article:

    <?php wp_list_pages('sort_column=menu_order'); ?>

    Thread Starter tom23

    (@tom23)

    So what php file within my theme should I edit and how to put numbers to set the order?

    Is this correct : <?php wp_list_pages(‘sort_column=menu_order 1’); ?>

    With the help of the Template Hierarchy article, determine what Template you want to display your Pages, then edit that file. For example, usually you would edit sidebar.php to display that in your sidebar. Note the WordPress Default theme’s wp-content/themes/default/sidebar.php has an example.

    This is correct:

    <?php wp_list_pages('sort_column=menu_order'); ?>

    Please review the link I provided above to wp_list_pages to see examples and documentation.

    Thread Starter tom23

    (@tom23)

    This is how it looks now in my header.php

    <ul class="navmenu">
    		<li class="<?php if ( is_home() or is_archive() or is_single() or is_paged() or is_search() or (function_exists('is_tag') and is_tag()) ) { ?>current_page_item<?php } else { ?>page_item<?php } ?>"><a href="<?php echo get_settings('home'); ?>"><?php _e('BLOG'); ?></a></li>
    		<?php wp_list_pages('sort_column=id&depth=1&title_li='); ?>
    		<?php wp_register('<li>','</li>'); ?>
    </ul>

    So should I just change the “sort_column=id….” to “sort_column=menu_order” ?

    yes

    Thread Starter tom23

    (@tom23)

    Thanks! Works perfect. I used 1000,2000,3000 instead of 1,2,3 to define page orders in admin panel, I hope that’s a good way of doing it.

    Thanks for the help!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘How to custom order the Pages (plugins dont work)’ is closed to new replies.