• Resolved buddyrigotti

    (@buddyrigotti)


    Can you make this work on product archive pages? I want to show the yotpo bottomline on product archive/category pages (not just the single product page). I am using the bottomline short code but it’s not printing anything.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author hxii

    (@hxii)

    Do you mean regular category pages or ones built with a page-builder?
    Can you show me how you implement the shortcode?

    Thread Starter buddyrigotti

    (@buddyrigotti)

    I am using Beaver Builder Page Builder to build a template for the archive pages. If I use the shortcode [yotpo_bottomline], it does not output anything. But if I use the shortcode (example) [yotpo_bottomline product_id="47"], it will output the yotpo bottom line for that particular product id, but of course, I don’t want one product id bottom line to show for all the products on the archive page. I want each individual yotpo bottom line to show for each product. Hopefully that made sense.

    Plugin Author hxii

    (@hxii)

    Unfortunately, with page builders it’s not possible (AFAIK) to automatically get the product ID (in the context of category/archive) as the shortcode is not within the product loop when you add it, so you will have to add the product_id property with the proper value.

    Thread Starter buddyrigotti

    (@buddyrigotti)

    Gotcha, thanks for the help. Although, I’m seeing a new error now that I’ve never seen before. It is on a single product page, using the [yotpo_bottomline] shortcode. The error is showing at the top of the content section on products that have 0 reviews. The error does not show up for products that have 1+ reviews:

    Warning: array_key_exists() expects parameter 2 to be array, string given in /path/to/root/public_html/mydomain.com/wp-content/plugins/shortcodes-for-yotpo/wc_yotpo_shortcodes.php on line 62

    Thread Starter buddyrigotti

    (@buddyrigotti)

    Oh, now I see the noempty attribute. I added that to the shortcode and that solved the issue.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Archive Pages’ is closed to new replies.