WordPress.org

Ready to get started?Download WordPress

Forums

Genesis Subpages as Secondary Menu
[resolved] Ordering Sub Navigation (8 posts)

  1. alh0319
    Member
    Posted 2 years ago #

    Is there anyway to order the sub navigation other than alphabetically?
    Thanks.

    http://wordpress.org/extend/plugins/genesis-subpages-as-secondary-menu/

  2. Bill Erickson
    Member
    Plugin Author

    Posted 2 years ago #

    Yes you can, by using the be_genesis_subpages_args filter:

    http://www.billerickson.net/code/genesis-subpages-sort-by-name

  3. alh0319
    Member
    Posted 2 years ago #

    Adding that code took down the site. (Completely blank page, no error message)

  4. Bill Erickson
    Member
    Plugin Author

    Posted 2 years ago #

    I'd have to see your functions.php file, but my guess is you added <?php when it wasn't needed. That's only needed at the very top of your php file, or if you've used the closing php tag ( ?> ). More information on PHP open/close tags: http://www.untwistedvortex.com/2010/12/10/php-programming-beginners-php-open-close-tag-set-programming-display/

    I've tested the code and it worked fine on my site.

  5. denisedesign
    Member
    Posted 2 years ago #

    Bill Erickson, you are a genius. Putting the secondary navigation in the sidebar is an integral part of 75% of my sites. Your plugin works perfectly! Trouble is, it's ordering the pages alphabetically. I added the above code to the functions.php file of my child theme and nothing is broken, but pages are still ordered alphabetically. Any chance you can help with a solution that orders them according to something in my control? Thanks in advance for your help.

  6. Bill Erickson
    Member
    Plugin Author

    Posted 2 years ago #

    Hmm, that code should work for everyone.

    Have you put it into your theme's functions.php file?

    Do you have any other plugins that might be interacting/overriding the default WordPress query?

  7. denisedesign
    Member
    Posted 2 years ago #

    The subpages are ordered alphabetically by name still. How dose this code change that? How should they be ordered once this code is added? I guess I'm not clear on that. Thanks much for your assistance!

    Example:
    http://216.119.68.58/wordpress/portoflio/

  8. denisedesign
    Member
    Posted 2 years ago #

    I knew there was something simple that I was missing. I can order them by the page order number in the admin, without your code. It was there all along! Sorry for the run around. Thanks for all you do.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic