[Resolved] Hook to display on category + all child cats

Home Forums Support [Resolved] Hook to display on category + all child cats

Home Forums Support Hook to display on category + all child cats

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1026397
    Berto

    I registered several new menus and took a short cut to display the menus on categories by using an elements > hook.
    Custom Menu

    Example, the first menu to only be displayed under category ‘competitions’ – but there is no way to make this display on all child categories, will I need to add additional location rules for every single child category or is there another way around this using elements > hooks?

    If there isn’t it looks like I will need to move this to the functions file. I thought I would save me some time.

    #1026626
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    Have you tried opening a child category yet? It’s possible that WordPress would show the hook on child categories by default.

    If not, we should be able to filter the hook display rules to include child categories.

    Let me know πŸ™‚

    #1026816
    Berto

    Hi Tom,

    No, they don’t display by default, I have to create additional rules.

    #1027261
    Tom
    Lead Developer
    Lead Developer

    Sounds like something we should try to implement in the Display Rules by default.

    You mentioned using a function – is that something you’re able to write? If so, that’s likely the easiest route.

    If not, we can create a function which filters the Display Rules, but that will likely be more complex than writing a simple hook with a condition.

    Let me know πŸ™‚

    #1028279
    Berto

    Thanks Tom.

    #1028605
    Tom
    Lead Developer
    Lead Developer

    No problem πŸ™‚

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.