Support » Plugin: WP Tiles » product category from woocommerce does not work

  • Resolved krolick



    I have a problem on one of the sites I’m working on.
    I use wp-tiles plugin on one of the subpages in few variations.
    My client wanted it to show different types of wordpress pages in different groups eg. pages in one of the tabs, posts in the other and products from diffferent categories in two or three of them.

    I managed to display posts and pages from different categories but I have a problem with products. When I use the “category” shortcode it does not show any product, but when I try to use “product_cat” instead – all the products published on the site appear. And there should be only one present.

    My shortcode in the “Digital Courses” tab looks like this:

    [wp-tiles posts_query='post_type=product&product_cat=51' template="4InARow" colors="#8f0099, #7d0099"]

    Is it possible for the wp-tiles plugin to work with the product categories just as nicely as it does with the posts and pages?

    Thanks for any info. Justina.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Mike Martel


    Hi Justina,

    Interesting question! I’ve been playing with it, and with the current setup, your only option is using a custom tax query. However, arrays (square brackets) are not correctly parsed by the shortcode, so I made it so (in v0.5.5, uploading now), that you can use curly brackets instead.

    Your shortcode would become:

    [wp-tiles posts_query='post_type=product&tax_query{0}{taxonomy}=product_cat&tax_query{0}{field}=id&tax_query{0}{terms}=51' template="4InARow" colors="#8f0099, #7d0099"]

    You could consider changing the field to slug and using the category slug.




    Hi Mike,

    Thanks a lot for the info.
    This solution will suit me just fine.
    I’ll try it as soon as the update is avaliable in my wordpress administration panel.

    Thanks again,

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘product category from woocommerce does not work’ is closed to new replies.