Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 59525

woocommerce_product_query doesn’t fire for [products] shortcode

$
0
0

Replies: 0

My Basic question is is there an equivalent to woocommerce_product_query that fires not only on the shop page, but on any arbitrary page with a [product] short code. I also have WOOF and ivory search installed. I specifically want to filter by post__in based on a comma separated list of product ids passed by environment variables. I have all those pieces solved but what action or filter to modify the query in.

I could not get the Kathy Is Awesome example of limiting post ids to work in my page. I was migrating an existing wordpress site and what I though was the shop page was actually just a page with the products short code like

php
[ivory-search id="70292" title="Toolbox Home"]
[woof]
<div class=&quot;foo-container&quot;>
  <div class=&quot;foo-browser&quot;>
    [products paginate=&quot;true&quot; limit=&quot;100&quot; columns=&quot;1&quot;]
  </div>
</div>

So once I realized the shop page was a special page that injects the product loop without a short code I went to that one and woocommerce_product_query actions did fire.


Viewing all articles
Browse latest Browse all 59525

Trending Articles