Good afternoon, I have been testing the theme configuration options to display the products and I have some questions regarding the product labels. I attach screenshots.
I am creating a virtual store of mechanical spare parts with the following taxonomy: Brands (product brand), Labels (vehicle model) and Categories (type of product), I have advanced it as planned and I have not had major problems in accommodating it with the theme .
The problem that has arisen is that I need to show the product label as it currently appears on the store page: https://iili.io/JJ5yyvI.png
To do this, add PHP code and CSS styles to the “functions.php” and “styles.css” of the child theme. I thought that with that, it would always be shown like this in all sections, but I see that it is not, since on the pages that load from the links of the brands, labels and categories, the product label is not shown:
https://iili.io/JJ5ypYN.png
https://iili.io/JJ79JTX.png
https://iili.io/JJ799pt.png
Likewise, in Elementor XStore components, when added, this field is not displayed in the front part of the content:
https://iili.io/JJ79FCG.png
https://iili.io/JJ79KGf.png
https://iili.io/JJ79djn.png
https://iili.io/JJ792Qs.png
I have reviewed the documentation, in addition to carrying out several tests and I cannot find the key to always show the product label.
I share with you privately the codes used. I would appreciate it if you could tell me which hooks are necessary or the correction to be able to display this field and it can be visible in the products.
I will be attentive to your observations.
Kind regards.
Site URL: hidden Theme version: 9.1.14 WooCommerce version: 8.1.1Hello, Jose Hernan,
Thank you for contacting us and for using XStore.
Once we checked your code we found that you took it from here -> https://gist.github.com/jmarreros/ed2b577e810830bcade91eac94c12eac and as you can see there is a condition in the code to start it only on shop page -> https://prnt.sc/RygCHzn_2672
So, please, remove the condition of if ( ! is_shop() ) return; and check again.
After removing this code will be added for products everywhere the ‘woocommerce_after_shop_loop_item_title’ hook starts.
Kind Regards,
8theme team
Good evening, it works perfectly with the correction that you have indicated to me.
Thank you so much !
Kind regards.
The topic ‘Show the product label on the products in the different sections of the website’ is closed to new replies.
One standard license is valid only for 1 project. Running multiple projects on a single license is a copyright violation.