OnPoint Plugins

  • Plugins
    • Advanced Sidebar Menu
    • Go Live Update Urls
  • About
    • Services
    • Showcase
  • Blog
  • Contact
  • Support
  • Log In
← Back to support

Only Show Categories Assigned To Current Post

Resolved

Requested: 3 years and 5 months ago

Hi Mat – I might be missing something right in front of me, but is there a way to show only the categories that the individual post relates to? Thank you.

Plugin: Advanced Sidebar Menu

  1. OnPoint Plugins

    3 years and 5 months ago

    Hi David,

    Using your current widget settings as a reference:

    1. Always display child categories = checked
    2. Levels of child categories to display = 1
    3. Display widget on every page = checked

    This may be accomplished by adding the following filter to your active theme’s functions.php file.

    Have a great night!

    Mat Lipe

  2. dmonico

    3 years and 5 months ago

    Brilliant and glad I wasn’t going crazy not seeing something out of the box. Implemented to php and it works perfectly. Thanks again!

  3. dmonico

    3 years and 5 months ago

    Hi Mat – I actually noticed it’s bringing in all of the categories we’ve checked off rather than filtering for “Top level parent Category to use for this widget”. 

  4. OnPoint Plugins

    3 years and 5 months ago

    Hi David,

    If you would like to force the widget to only show categories which are first level decedents of the selected “Top level parent category” you may change the original code to the following:

    Have a great day!

    Mat Lipe

  5. dmonico

    3 years and 5 months ago

    Hi Mat – That doesn’t seem to be filtering for only the children of the parent “Topics” category. Thanks for your assistance!

  6. OnPoint Plugins

    3 years and 5 months ago

    Good Evening David,

    I believe I may have found the issue. The option “Top level parent Category to use for this widget” is actually part of the “Display widget on every page” checkbox and only really works with that checked.

    If you check that option, the menu will start filtering by that category.

    I understand how this can be confusing when using Elementor because it disables the widget functionality which shows and hides options based on the selected ones, which makes the widget much less intuitive.

    Have a great night!

    Mat Lipe

  7. dmonico

    3 years and 4 months ago

    Interesting and thank you! That did the trick.

New Response Cancel reply

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

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

  • Plugins
  • Blog
  • Contact