• I cannot find the answer to my particular problem. I tried using the Google search but it didn’t bring anything up. I have read about adding the code to the sidebar to have your pages in the order you’ve chosen for each page.

    However, I already have the “exclude pages” argument in there & if I add the “List Pages by Menu Order” argument it overrides the exclusion argument & all my pages, even the excluded ones, get listed in my sidebar. On top of that, the order I designated for each page still doesn’t work.

    Can you only choose one of these arguments or am I inserting the code improperly? I’ve tried several different ways (trying to include it with the exclusion argument) but then I get parse errors.

    Having a specific page order is important for my site (real estate related).

Viewing 6 replies - 1 through 6 (of 6 total)
  • here is the code you’ll need:

    <?php wp_list_pages(’sort_column=menu_order&title_li=Your Title’); ?>

    I used it too.

    I combined it with the exclude code like this (I found it myself :p):

    <?php wp_list_pages(‘sort_column=menu_order&exclude=3,4&title_li=Your Title’); ?>

    edit: I used it to make pages to different links so it looks like a site instead of a blog.
    https://www.mingei.be/home (there is still a lot to do)

    Thread Starter judyo

    (@judyo)

    Thank you so much! Just what I needed. I’m pretty new to this & trying to learn but I drive myself nuts with this code. I tried something similar to that but not exactly so of course it didn’t work.

    I, too, am trying to make my blog look more like a website. It is also under construction:
    https://www.oak-lawn-il.com

    Again, thanks.

    kwc

    (@kwc)

    Hello,

    I’ve added the sortcolumn=menu_order tag also into sidebar.php:

    <?php wp_list_pages(‘sortcolumn=menu_order&title_li=<h2>’ . __(‘Pages’) . ‘</h2>’ ); ?>

    but it appears to have no impact on the order of the pages. They all still sort alphabetically. Any thoughts as to what I might be doing wrong?

    Also, will this tag sort child pages? I’m wondering if it isn’t designed to handle that… perhaps that’s the problem I’m having.

    I’m using v. 2.01 of WordPress.

    moshu

    (@moshu)

    what I might be doing wrong?
    sortcolumn

    Try to copy/[aste the correct spelling from here: Template_Tags/wp_list_pages.
    Reading it carefully there might be answers for your other questions, too.

    kwc

    (@kwc)

    Now that was too simple of a fix… thanks for the quick (and accurate!) response!

    justeric

    (@justeric)

    sortcolumn should be sort_column

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Ordering Pages’ is closed to new replies.