garyroberts
Forum Replies Created
-
I forgot to tell you that we are trying to use this shortcode in a loop to display the image and title of the brand dynamically. We can’t dynamically get the ID of the product from the Loop Item Widget into a shortcode.
Your shortcode cannot get the product ID dynamically from the Loop Item Widget. In your documentation, it says that If “product_id” is empty the shortcode will try to get this value by itself” and that was what we banked on. We thought if that’s the case this could be used on a loop grid.
At the start, we tried but the image just won’t display.. only the text on some occassion (Not sure why this happens). When we dug through the template files and modified this line:
if ( ! $atts[‘product_id’] && is_singular( ‘product’ ) ) {with
if ( ! $atts[‘product_id’] ) {
the image is now visible inside the loop.Looks like you intend to only use this shortcode on single pages with the is_singular( ‘product’ ) argument. In our case we want to use it on our CPT’s to display the images on the archive page loops.
I think there’s no harm in this and we still believe this should be updated.Hi,
Any updates on this?
Thanks
Hi,
Here is a video https://www.loom.com/share/72c8db9629f34d58aad9f5fe48ba298c?sid=61cf0415-8bb5-4908-851e-f781f12a5f2f
Apologies, this is my first time using loom.
As you can see, at first we have already overridden the lineif ( ! $atts[‘product_id’] && is_singular( ‘product’ ) ) {
with
if ( ! $atts[‘product_id’] ) {
And when we return the original code, the shortcode disappears.
We will do this every update of the plugin if it is not yet addressed.
Your was the plugin recommended by WBW Product Filter PRO here: https://woobewoo.com/documentation/filter-by-brands/
We tried the Official WooCommerce Extension but it turns out, your plugin is the one working and is the one that’s showing images on the frontend. We need to show the images on the filter and inside the loop as requested by the client.- This reply was modified 1 month, 2 weeks ago by garyroberts.