WordPress.org

Forums

BE Subpages Widget
[resolved] not recognising menu_order (3 posts)

  1. ashtonej
    Member
    Posted 1 year ago #

    I put

    add_filter( 'be_subpages_widget_args', 'be_subpages_menu_order' );

    function be_subpages_menu_order( $args ) {
    $args['sort_column'] = 'menu_order';
    return $args;
    }

    In my 2014 theme's function.php file

    The entries are not appearing in the same order as the menu.

    Is there anything else I can do to get the submenu items in the right order?

    Thanks,

    Jim

    https://wordpress.org/plugins/be-subpages-widget/

  2. ashtonej
    Member
    Posted 1 year ago #

    Not sure if it was just me being thick but I got it to work.

    I put numbers in the ORDER field on each child page.

    Is this what menu_order is? because when I added the child pages into the actual site menu, the order was not picked up.

    Thanks,

    Jim

  3. Bill Erickson
    Member
    Plugin Author

    Posted 1 year ago #

    Correct, 'menu_order' refers to the page order of the actual pages, which you can control in the "Page Attributes" box when editing a page. It doesn't have anything to do with custom menus you have created.

    This is poorly named in WordPress core, which is why it is poorly named here.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • BE Subpages Widget
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic