[Resolved] Filter on menu by category and subcategory with heritage parent/subparent

Home Forums Support [Resolved] Filter on menu by category and subcategory with heritage parent/subparent

Home Forums Support Filter on menu by category and subcategory with heritage parent/subparent

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #55428
    Philippe

    Hello,

    I have a problem.

    On my site I have organised my menu on category and subcategory.

    Example : SSD/Intel, CPU/Intel and PC/Intel

    When I select SSD/Intel subcategory, all articles from intel catégory is accecible wihtout filter. A heritage parent/subparent not work ?

    Have you a solution for my ?

    Tks by advance.

    #55435
    Tom
    Lead Developer
    Lead Developer

    Hi Philippe,

    Not sure I understand completely.

    You’re saying when someone navigates to the SSD/Intel category page, all posts from the intel category are shown, not just SSD/Intel?

    I believe WordPress will show all posts associated with the category on each category page.

    Let me know – maybe a link to the page will help explain 🙂

    Thanks!

    #55444
    Philippe

    You have understand 🙂

    I would like on menu category “SSD” only a SSD category (work fine), and on menu category “SSD/Intel” only a Intel/SSD catecory (not work) => all Intel category (ssd, cpu, general Intel news, etc) are displayed.

    On second level of menu and more, it’s not filter by parent and sub/parent menu…

    This is a big problem for my. I absolutely need this feature. It’s the base for a news site with a well-functioning indexing menu.

    It’s possible for my to make a exemple on my site, but this creste a poor presentation of my site.

    I have loocking on the web a similar question in french language (http://forum.alsacreations.com/topic-20-73167-1-Portfolio-wordpress–afficher-seulement-les-categories-parent.html)

    In this post the solution is : replace a in theme (code page portfolio)

    $sorting_terms = get_terms(‘portfolio_category’);

    by

    $sorting_terms = get_terms(‘portfolio_category’, ‘parent=0’);

    It’s a working solution with GP ??

    Excuse my for my bad english…

    #55487
    Tom
    Lead Developer
    Lead Developer

    You could alter the query like that in a child theme, but you would have to have an understanding of PHP in order to achieve that.

    Maybe a plugin like this will be better for you? https://wordpress.org/plugins/list-category-posts/

    Let me know 🙂

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