OnPoint Plugins

  • Plugins
    • Advanced Sidebar Menu
      • Basic Version
        • Documenation
        • Usage
        • Developer Docs
      • PRO Version
        • Demo
        • Usage
        • Developer Docs
    • Go Live Update Urls
      • Basic Version
        • Documenation
        • Usage
        • Troubleshooting
      • PRO Version
        • Demo
        • Usage
        • URL History
  • About
    • Services
    • Showcase
  • Blog
  • Contact
  • Support
  • Log In
← Back to support

Custom UL classes and disable menu box in pages/posts

Resolved

Requested: 7 years and 6 months ago

We just bought the Advances Sidebar Pro. So far all good, but I have two questions:
– How can we add own classes to the <ul> element of a menu? Filter?
– How can we disable the Advances Sidebar Menu Box in pages/posts?

Thanks

Plugin: Advanced Sidebar Menu

  1. Avatar for OnPoint PluginsOnPoint Plugins

    7 years and 6 months ago

    You may accomplish this with a template override.

    Create a folder in your active theme called ‘advanced-sidebar-menu’
    Copy the page_list.php or category_list.php from the plugins ‘views’ folder into the folder you just created.
    Edit the ul elements in these new files.

  2. Avatar for bombellibombelli

    7 years and 6 months ago

    Thanks for your feedback.
    And what about that?
    How can we disable the Advances Sidebar Menu Box in pages/posts?

  3. Avatar for OnPoint PluginsOnPoint Plugins

    7 years and 6 months ago

    If you add the following code to your active theme’s functions.php file it will remove the box.

    remove_action( 'do_meta_boxes', array( Advanced_Sidebar_Menu_Pro__Meta__Title::instance(), 'createMetaBox' ) );

  4. Avatar for bombellibombelli

    7 years and 6 months ago

    Unfortunately this does not help.
    The box is still there
    Thanks

  5. Avatar for bombellibombelli

    7 years and 6 months ago

    Thanks, I’m talking exactly about this.
    I placed the code in a plugin we load for modifications:

    remove_action(‘do_meta_boxes’, array(
    Advanced_Sidebar_Menu_Pro__Meta__Title::instance(), ‘createMetaBox’
    ));

    But the metabox is still there.

    I have another question regarding Menus for categories.
    I want to show the categories in the blog archive  and single pages, but for some reason they do not appear.

  6. Avatar for OnPoint PluginsOnPoint Plugins

    7 years and 6 months ago

    If you place the code inside a plugin it must be wrapped in an action otherwise it will run too soon and be unable to de-register the action which is not previously registered. It will work like so.

    add_action( 'do_meta_boxes', function() {
    remove_action( 'do_meta_boxes', array(
    Advanced_Sidebar_Menu_Pro__Meta__Title::instance(),
    'createMetaBox'
    ) );
    }, 0 );

    The plugin requires a category or post to know which categories to display. If you want it to display elsewhere this may be accomplished via a couple of filters.

    add_filter( 'advanced-sidebar-menu/menus/category/is-displayed', '__return_true' );
    add_filter( 'advanced_sidebar_menu_category_ids', 'include_all_parent_terms', 1, 4 );
    function include_all_parent_terms( $term_ids, $args, $instance, $object ) {
    if ( 'category' !== $object->get_taxonomy() ) {
    return $term_ids;
    }

    return get_terms( array(
    'parent' => 0,
    'fields' => 'ids',
    'taxonomy' => 'category',
    'hide_empty' => true,
    ) );
    }

  7. Avatar for bombellibombelli

    7 years and 6 months ago

    Thanks a lot for your quick feedback!
    Got rid of the metabox 🙂
    Unfortunately, the filter you provided do not help.
    The sidebar menu containing the categories is still not visible.
    Any idea?

  8. Avatar for OnPoint PluginsOnPoint Plugins

    7 years and 6 months ago

    Are other widget displaying in this sidebar? Like if you add a “Text” widget does it display?

    Another thing worth mentioning, is the categories must have posts assigned to them to show up.

  9. Avatar for bombellibombelli

    7 years and 6 months ago

    Yes, other widgets appear fine.
    And the taxonomy categories has some categories with associated posts defined.

  10. Avatar for OnPoint PluginsOnPoint Plugins

    7 years and 6 months ago

    Turns out because your categories are all on the same level you must have the following options checked in the widget to show up:

    Display parent category
    Display menu when there is only the parent category

Newer Responses »

New Response Cancel reply

You must be logged in to respond. Only PRO members are allowed to respond to support requests.

© 2025 · WordPress Development · Terms Of Service · Privacy Policy · Cookie Policy · Log in

  • Plugins
  • Blog
  • Contact