WordPress.org

Forums

Page order in sidebar (19 posts)

  1. holzbude
    Member
    Posted 10 years ago #

    hi,

    i have a problem with the page order in the sidebar. the pages are listed in the order i create them. but i want it in another order (f.e. page 5 should be the second one in the sidebar). how can i do that?

    thanks for comments

  2. Minna
    Member
    Posted 10 years ago #

    On the page editing/creating page (heh) there is a Page Order field (under Page options) where you can enter a number, and then in the wp_list_pages tag you put sort_column=menu_order as a parameter (thus wp_list_pages('sort_column=menu_order'); if there are no parameters already)

  3. holzbude
    Member
    Posted 10 years ago #

    okay, i have done it, but there is no effect. this is my wp_list_tag now, perhaps there are some mistakes inside:

    <?php wp_list_pages ('title_li=<h2>' . __('Pages') . '</h2>'); ('sort_column=menu_order'); ?>

    thanks for help!

  4. superkim
    Member
    Posted 10 years ago #

    holzbude, it seems that the list_pages thing only takes one argument as its input. I tried to correct your input like this:

    wp_list_pages('title_li=<h2>' . __(' ') . '</h2>', 'sort_column=menu_order' );

    which, I think, should be the way to have 2 arguments. Didn't succeed. However without the headline there was no trouble, this one did the trick:

    wp_list_pages('sort_column=menu_order' );

    But then you probably have to make the headline manually..

  5. Kafkaesqui

    Posted 10 years ago #

    This should work, holzbube:

    <?php wp_list_pages('title_li=<h2>' . __('Pages') . '</h2>&sort_column=menu_order'); ?>

  6. superkim
    Member
    Posted 10 years ago #

    Holzbude: This is the way, I tested it:

    wp_list_pages('title_li=<h2>' . __('Holzbudes Pages ') . '</h2>&sort_column=menu_order');

    It takes a '&' to seperate parameters

  7. superkim
    Member
    Posted 10 years ago #

    Oh shit - a clever guy beat me :-)

    I personally would prefer not to have a headline for the pages, so perhaps I will make an empty space instead of 'Pages'

  8. holzbude
    Member
    Posted 10 years ago #

    yeah, thanks superkim, it works fine!

  9. Rob Poitras
    Member
    Posted 10 years ago #

    I was looking for something similar. Its actually all in the codex:
    http://codex.wordpress.org/Template_Tags/wp_list_pages
    another reason why wordpress > *

  10. Michiel
    Member
    Posted 10 years ago #

    Hi, I checked from the codex and used:
    " <?php wp_list_pages('sort_column=menu_order&title_li='); ?> "

    However the order is NOT correct displayed in my horizontal nav bar.. what goes wrong here?
    0000000000000000000000000000000000
    Solution found: forgot that by default all pages are "0" in the order...

  11. Erec
    Member
    Posted 9 years ago #

    Great! Thanks for the help! =)

  12. musicroad
    Member
    Posted 9 years ago #

    thanks again Kafkaesqui
    ^_^

  13. pmginn
    Member
    Posted 9 years ago #

    I have the following:

    <?php wp_list_pages('title_li=' . __(' '). '&sort_column=menu_order'); ?>

    I want to use ('depth=1') so that my subpages do not show. But when I use that tag, the "pages" header shows up in normal font, no decoration. Can anyone help?

    Thanks!

  14. pmginn
    Member
    Posted 9 years ago #

    nevermind... found the answer:
    <?php wp_list_pages('depth=1&sort_column=menu_order&title_li='); ?>

  15. plunderbund
    Member
    Posted 9 years ago #

    got mine ordered right...thanks all. one quick other question. how do i get rid of the dot right next to the pages menu? i screw stuff up when i try to do it.

    http://www.shakblog.com

  16. kboan
    Member
    Posted 9 years ago #

    YES!! How do you get rid of the bullet in front of the word Page????? I have tried every which way I can think of to effect this with CSS. But I can't make it work.

    ANYBODY??

  17. heyrsmith
    Member
    Posted 9 years ago #

    you could always just hardcode it like:

    <h2>Pages</h2>
    <ul class="pages">
    <?php wp_list_pages('sort_column=menu_order&title_li=' ); ?>
    </ul>

    the ul class="pages" is of course not needed, I just use it style the list via css.

  18. khimilch
    Member
    Posted 8 years ago #

    like where to i have to put the tag ?

  19. PLWatts
    Member
    Posted 8 years ago #

    Thanks!!! This works for me! My client is finally happy with the menu for the site, now I can move forward with the 200+ pages that we are using WP as a CMS for

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.