• Resolved Shaolin

    (@shaolin)


    Hello

    I’m testing this out in Bricks builder and thus far I like it, but like many of these swatches while it works fine on the default archive pages, when you build custom ones it simply doesn’t show up (this also happens in Elementor custom shop pages, and yours isn’t the only one to do this)

    Previous swatches plugin I used I was able to get round that by using a shortcode but as it is throwing up a few errors in Dev tools (although it still renders fine) I decided to try this plug. I really like it and want to get it working with the custom shop archives.

    Is there a shortcode or a bit of php code that will enable me to insert it directly into my shop template? Been having a look through the various php files to see if I can find the bit of code I need to copy, can you point me in the right direction please?

    Any help is appreciated.

    Thanks!

    • This topic was modified 2 years, 1 month ago by Shaolin.
Viewing 1 replies (of 1 total)
  • Plugin Author XplodedThemes

    (@xplodedthemes)

    I’m sorry, but it is not currently possible to use a shortcode to make the swatches plugin work on custom pages or templates.

    The thing is, for this to work, products loaded on the archive or the custom archive template, they need to be loaded as if they were single products. This way, all the variation data will be loaded as well.

    You can try to add the single product instead and see if it works: https://academy.bricksbuilder.io/article/single-product/

    Hope this helps

Viewing 1 replies (of 1 total)
  • The topic ‘Code to directly insert in template’ is closed to new replies.