Support » Fixing WordPress » Displaying items by tag of specific category

  • I am trying to display some of my woocommerce products by tag, but only if they are in a certain category. For example: If I have the categories “books” and “mugs” and both have products with the tag “black” in it, I would like to display all products of the category “books” with the tag “black” in it.

    So far I only figured out how to show either the category with all products in it or all the products with the tag “black”. Is there a way to combine it?

    • This topic was modified 6 months, 2 weeks ago by J32.
    • This topic was modified 6 months, 2 weeks ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Everything else WordPress topic
Viewing 4 replies - 1 through 4 (of 4 total)
  • How are you doing it now? If you can give an example, we can (hopefully) point you in the right direction.

    Now I am either linking to a category or to a tag to show products, but I cannot link to a tag within a category.

    I don’t know of a way to do it purely through links. You might have to modify your themes template files (using a child theme of course) and work in some variables that will let you manipulate the WP_Query object that’s used to return the posts. It’s not a quick or easy thing to do, but possible if you’re OK with coding.

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    Moved to Fixing WordPress, this is not an Everything else WordPress topic.

    Please ask plugin specific questions in that plugin’s dedicated sub-forum instead.

    https://wordpress.org/support/plugin/woocommerce/#new-post

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Displaying items by tag of specific category’ is closed to new replies.