o0MSK0o
Forum Replies Created
Viewing 1 replies (of 1 total)
-
Forum: Plugins
In reply to: [WooCommerce] Inserting things into category listHi @lorro,
Thanks for the response.
I would think any change to your list of categories would break such a setup however it was coded.
What do you mean? Do you mean in terms of breaking the layout? That shouldn’t be a problem–I just need to make sure it’s only output every three items. If I can edit the PHP within the loop that won’t be a problem–I just need to add a variable containing the current category count and check
($i%3===0). E.g.foreach ( $product_categories as $i=>$category ) { wc_get_template( 'content-product_cat.php', array( 'category' => $category, ) ); if($i%3===0) { // output sales ad } }It’s just that I didn’t want to have to recreate the
woocommerce_output_product_categoriesfunction. I want this to be in the theme, so I think that’s the route I’ll have to take–though it does feel very messy.Thanks for trying to help.
Viewing 1 replies (of 1 total)