This topic has 4 replies, 2 voices, and was last updated 6 years, 7 months ago ago by Rose Tyler
Hello,
with theme version3.0.2.1, I was using the [etheme_products] shortcode to filter products that had a specific tag like so:
[etheme_products categories=”38,39,40″] while 38,39 and 40 where Tag IDs, not Category IDs.
With version 3.1. this doesnt work anymore. The shortcode only works for categories and not for tags. What can I do in order to make it work for tags too like it was before?
Many thanks in advance and best wishes!
Hello,
I suppose it will be added in new theme update, so you may change this code
http://prntscr.com/gnxa4a to http://prntscr.com/gnxab8 in framework/shortcode.php file of your parent theme
$args['tax_query'][] = array(
'relation' => 'OR',
array(
'taxonomy' => 'product_tag',
'terms' => $categories,
'operator' => 'IN',
),
array(
'taxonomy' => 'product_cat',
'terms' => $categories,
'operator' => 'IN',
)
);
Regards
Yay that did the trick, thank you so much!
Could you imagine to include the provided code in the next update?
Hello,
You’re welcome!
Yes, it will be added in next theme update.
Regards
You must be logged in to reply to this topic.Log in/Sign up