Site logo

Archived topic

Reuseable and adjustable product info

7 replies · Started by Diederick on June 12, 2021

Viewing posts 1–8 of 8

Hi,

I've searched everywhere but can't really find the right fit for this.
I have a webshop with multiple brands and WPML.
In the product long description I'm adding information about these brands.
Currently I've made templates with my pagebuilder.

Downside of this method is that I need to add it to every page.
And translate it every time.
And when something needs to be changed I need to re-adjust all my products since they have no link.

Question here is: Is it possible to have some kind of block or template like element that holds the info.
And can be adjusted in one place instead of adjusting all products?

Hi there,

you can use a Hook Element ( for adding HTML or Shortcodes ) or a Block Element ( for creating block content or adding shortcodes ).

Both of them allow you to select a Hook for where to display that content and Display Rules for which 'pages' it will be displayed on.

A list of hooks and their position for the GP Theme Templates can be seen here:

https://docs.generatepress.com/article/hooks-visual-guide/

And for the default Woocommerce Single Product Templates see here:

https://www.businessbloomer.com/woocommerce-visual-hook-guide-single-product-page/

Hi David,

Thanks for the tips.
But hooks can't solve it I guess.
The code needs to be shown if a specific attribute is attached to a product.
In this case that would be the brand.
If brand X is added then show blockX
If brand Y is added then show blockY
And so on.

And if that isn't possible I then need to add all pages one by one to the filter.
Not a good option since we have over 2500 products each year.

O great then I'll need to try that!

Let me know if it works :)

Just got some time to test this.
And it worked!
Easy to translate in WPML.
Thanks for the aid.

Great!

Glad to be helpful :)

This archived topic is closed to new replies.