WordPress.org

Forums

[Plugin: My Page Order] WP 2.9 - when ordering nothing changes on site (45 posts)

  1. agengo
    Member
    Posted 3 years ago #

    Hello,

    After I realized my pages were no longer ordered I upgraded WP to 2.9 and the plugin to 2.86. My pages will still not order on the site. They look like I want them to within the dashboard under pages > my page order. I click the button, get the "Page order updated successfully." When I go to the site my pages in the nav are still listed in alphabetical order, not how I wanted them.

    Please advise,
    Abby

    http://wordpress.org/extend/plugins/my-page-order/

  2. MichaelH
    Member
    Posted 3 years ago #

    You would need to be using something like this in your 'nav':

    wp_list_pages('sort_column=menu_order&title_li=');

    Stepping Into Template Tags
    Stepping Into Templates
    Template Hierarchy

  3. agengo
    Member
    Posted 3 years ago #

    Ok, now we're getting somewhere. The pages are ordered properly but the tabs of the nav are squished together. To fix, I can tell (through Firebug) that a <span> needs to go inside each but since that info is being pulled in where can I add the <span>?

    Thanks for your help!!

  4. froman118
    Member
    Posted 3 years ago #

    agengo,

    Are you using the built in Page widget, the My Page Order widget or did you modify your theme directly? If the theme, what code was there before?

  5. agengo
    Member
    Posted 3 years ago #

    I'm using the My Page Order plugin. It only works (orders pages to correct order as defined under Pages > My Page Order) when I put in that snippet of code you gave me in the header.php file. But when I put that code in, the nav tabs are squished.

    The code that I replaced with what you gave is wp_list_page('depth=1&title_li=&exclude=143' );

  6. froman118
    Member
    Posted 3 years ago #

    You should have this:

    wp_list_page('sort_column=menu_order&depth=1&title_li=&exclude=143');

    If it is still squished post a link to your site, would help to actually see what is happening.

  7. agengo
    Member
    Posted 3 years ago #

    Thank you froman118, that code made it work as it should. Can you break that down for me? I'm new to PHP code.

  8. froman118
    Member
    Posted 3 years ago #

    "sort_column" tells it how to sort the pages.

    "depth" tells it how far down to go in the page hierarchy. Depth = 1 will only show the top level parent pages.

    "title_li" outputs a header in the list, but omits it when left blank.

    "exclude" stops the page with that ID from being displayed.

    Without depth or exclude, you were probably listing too many pages and your page ran out of space to display them all. My best guess without actually seeing it.

  9. Bdarly
    Member
    Posted 3 years ago #

    Hello,

    I am using My Page Order and love it. Thank you! It works just fine with parent pages but does not work with the subpages even though it shows on the admin page that it does. I read the information above but do not understand it. I'm new to wordpress. Is there any help you give to me?

    Thank you.

  10. froman118
    Member
    Posted 3 years ago #

    Bdarly,

    Are you using a regular template or widgets? Did you switch to the My Page Order widget?

    Can you be more specific about what isn't working with subpages?

    Andrew

  11. Bdarly
    Member
    Posted 3 years ago #

    Thanks for responding, Andrew. I am using the Elegant Grunge Theme. I don't have the My Page Order widget over on the sidebar because then the pages don't collapse under the parent page. So I only see My Page Order under Pages on the left hand side of my dashboard.

    The My Page Order works fine for the parent pages but when I go in to to the left and click on My Page Order to rearrange my subpages, it looks like it works, it says it works, but when I save and then go look at my page, the order of the subpages is still alphabetical instead of how I rearranged them.

    I appreciate your help and time.

    Carla

  12. froman118
    Member
    Posted 3 years ago #

    Carla,

    That's strange, I just tested it on my site and the "Pages" widget displays the same as "My Page Order" (with depth = 0). I'm not sure why the subpages aren't being ordered, is the sort by option in the widget set to Page order?

    Andrew

  13. Bdarly
    Member
    Posted 3 years ago #

    Perhaps the problem is that I have the Collapsing Pages widget installed and use it instead of the Pages widget. I think I'll be fine with the subpages being alphabetically ordered after all if I can't figure this out. I really appreciate your help. If you'd like, you can view my blog here: http://carlaroyal.com/ I'm so impressed with WordPress and the plugins. You guys do an amazing job!

    Carla

  14. froman118
    Member
    Posted 3 years ago #

    Yeah it sounds like a bug with Collapsing Pages, if you have the "menu order" option selected then it should use the order set by My Page Order. Could try contacting the plugin author.

    Andrew

  15. Bdarly
    Member
    Posted 3 years ago #

    That worked! Thanks, Andrew! I'm headed to donate a small amount to you right now. You're worth much more but I'm really low on cash. Know that you are appreciated!

    Carla

  16. aaplus
    Member
    Posted 3 years ago #

    I have the same problem as agengo. I'm new in wp and css - so I hope someone can explain to me, where exactly I should put the codestring

    In my theme I have a main-nav.php - is it here?

    the code in main-nav is like this:

    '<!-- BEGIN MAIN-NAV.PHP -->

    <!-- END MAIN-NAV.PHP -->'

    Anja

  17. froman118
    Member
    Posted 3 years ago #

    Change this:

    $pages = $wpdb->get_results("SELECT post_name, post_title, ID FROM $wpdb->posts WHERE post_type='page'");

    to this:

    $pages = $wpdb->get_results("SELECT post_name, post_title, ID FROM $wpdb->posts WHERE post_type='page' ORDER BY menu_order ASC");

    That will get it sorted by the order you set.

  18. rickblackmon
    Member
    Posted 3 years ago #

    Maybe I am having a senior moment (or day), but where is this "nav" where I am supposed to insert this mod? I am having the same problem in page order and category order. I looked at all of the files in the blog using the ftp program and switched between several themes, the problem is in them all.

    I appreciate any help.

  19. froman118
    Member
    Posted 3 years ago #

    Rick, the code I posted is specifically for aaplus's theme. For your theme follow the regular instructions for each of the plugins:


    http://wordpress.org/extend/plugins/my-category-order/installation/

    http://wordpress.org/extend/plugins/my-page-order/installation/

    If you have widgets, just a matter of swapping widgets. If not, you do need to modify your theme, most likely the sidebar.php.

  20. rickblackmon
    Member
    Posted 3 years ago #

    Thanks for the prompt response.

  21. drjohnsonatl
    Member
    Posted 3 years ago #

    I am having a similar issue. I use DIYthemes and I have the MyPO installed. Like several before me it looks right in the "Pages" view, but it does not change the order on my screen. I went into a couple of header.php files and aded the code, but nothing changed...maybe I was not looking at the right header file.

    Could you please advise with the following:

    1 - What header.php file should I be looking at (just to be sure)?
    2 - Is this the code segment I need to add: wp_list_page('sort_column=menu_order&depth=1&title_li=&exclude=143');
    3 - Does the Thesis theme potentially cause the issue?

    Appreciate any help I can get...

    David
    http://www.ubermarketingnow.com

  22. froman118
    Member
    Posted 3 years ago #

    David,

    Your site is down, but double check if you are using widgets first. If you aren't then the correct code is:

    wp_list_page('sort_column=menu_order&depth=1&title_li=&exclude=143');

    Shouldn't be a problem with Thesis, just have to figure out where to update your theme. That's why widgets are nice, no trolling through php files looking for the right template tag.

  23. drjohnsonatl
    Member
    Posted 3 years ago #

    LOL...my level of technical incompetence hit a new historic high. I just got off the phone with godaddy...I not only took my sight down...they said I may have initiated with wp server down being down for 2 hours.

    My sight is back up now.

    btw - I use many widgets:
    Akismet, Archives, Calendar,Categories, Google Analytics, Google Custom Search, KillRecent Entries, LInks, Meta, My Page Order, Pages, Recent Comments, Recent Posts, RSS, Subscriptions, Tag Cloud, Text, Twitter Charts, Twitter Conversations, Who's Online - do you think I am missing anything?

    As for finding where to make the changes in Thesis, I'm not sure where to look. Is there a source you think I should reach out to that could advise me?

    Let me know.

    I also want to sincerely thank you for your response. I very much appreciate your insight.

    David

  24. froman118
    Member
    Posted 3 years ago #

    I've never really looked at Thesis, but now I see that it uses a custom Navigation Menu. I'm assuming you're trying to order the tabs across the top of the page? You don't actually need my plugin, Thesis has it all built into its settings. See this post for info on editing it:

    http://win-with-1.com/add-wordpress-pages-thesis-navigation-tabs/

  25. nylonlover
    Member
    Posted 3 years ago #

    I am also having problems with the pages and subpages still showing in Alpha order.

    I'm using the Skyye-news theme. The header page has a function

    wp_page_menu(); //page menu

    which I found in a legacy.php page with the following:

    /wp_list_pages(array('exclude' => $exclude_pages, 'title_li' => '', 'depth' => '2', 'sort_column' => 'menu_order'));

    I replaced that with

    wp_list_page('sort_column=menu_order&depth=1&title_li=&exclude=143');

    And did not do a thing. I even commented out the code in the function and just left that code above, nothing.

    Any ideas???

    Thanks!

  26. froman118
    Member
    Posted 3 years ago #

    nylon,

    You'll want to modify the call to wp_page_menu(), I'm guessing the legacy.php file is for older versions of WordPress.

    Try changing

    wp_page_menu(); //page menu

    to

    wp_page_menu('sort_column=menu_order&depth=1&title_li=&exclude=143');

    I'm pretty sure wp_page_menu just calls wp_list_page and I think it will pass through all your parameters to it so hopefully it limits the depth.

  27. Ssandra
    Member
    Posted 3 years ago #

    Hi,

    I hope you can help me. I have some common sense, but no knowledge of PHP, Coding, etc.

    I am using the theme WP-PortalTheme 2.1 by Portal Labs, LLC and the plugin My Page Order.

    However, my pages do not change order :) Before the plugin I've tried to do this by the "normal" wordpress thing, where you put 1, 2 and 3 somewhere, but it didn't work. Now this plugin doesn't work either.

    Anybody who can help me?
    The code in the header thing (I think it is the right one) is:
    <!-- BEGIN navigation -->
    <ul id="navigation">

  28. /">Home
  29. <?php dp_list_pages(); ?>

    <!-- END navigation -->

    I could be completely wrong here of course... :D Like I said, I have 0 experience or knowledge.
    Anybody who could help me, I'd be eternally grateful!!

  • Ssandra
    Member
    Posted 3 years ago #

    Never mind. Found it!!

    For those who are interested: In the editor under theme functions (functions.php) I changed the ORDER BY from, whatever it was, to $wpdb->posts.menu_order ASC.

    And it works!! :D:D

  • gymwithjerry
    Member
    Posted 3 years ago #

    Hello all.

    I need some help w/ page order. Im using the Panorama Theme by Themocracy.

    I have no idea which *.php to change nor do I know which code to actually change.

    in the functions.php....there is the following: function ap_getPageMenuOrder() {

    switch (get_option('ap_pageMenuOrder')){

    case ('alpha'):
    $mo = 'post_title';
    break;

    case ('pageid'):
    $mo = 'ID';
    break;

    default:
    $mo = 'menu_order';
    }

    return $mo;
    }

    Please help!

    http://www.gymwithjerry.com

  • froman118
    Member
    Posted 3 years ago #

    gymwithjerry,

    Looks like the theme pulls the sort order for the horizontal menu from an option on the theme. Look in the theme's Option page in the Admin area, there's a Pages Menu section with a "Order by" dropdown. Set that to "Page Order" and it will use the order set by My Page Order.

    Andrew

  • 12

    Topic Closed

    This topic has been closed to new replies.

    About this Topic

    Tags