Homepage › Forum › Product Support › Sofani › WooCommerce Product template
- This topic has 6 replies, 2 voices, and was last updated 8 years, 9 months ago by
James.
-
AuthorPosts
-
8 years, 9 months ago #7610
Okay...Now I have an odd one for you. 🙂
We want to put a blurb on every product stating "Due to the nature of the medium (metal) each piece has burnishing and shading in different areas of the piece. Click *here* to view a video clip of our art in motion. If you'd like photographs of your exact piece prior to shipping, please utilize the contact form before placing your order."
Is there a place we can do this without having to edit every one of the products in WooCommerce?
In other words, is there a "Product Template" page somewhere that is the basic page template for all the products?
8 years, 9 months ago #7611This reply has been marked as private.8 years, 9 months ago #7645Hi,
Apologize for the reply late.
You can use child theme, and add code to file wp-content/themes/yolo-sofani-child/functions.php
function add_custom_notice(){
echo '
Due to the nature of the medium (metal) each piece has burnishing and shading in different areas of the piece. Click *here* to view a video clip of our art in motion. If you’d like photographs of your exact piece prior to shipping, please utilize the contact form before placing your order.
';
}
add_action( 'woocommerce_before_single_product', 'add_custom_notice', 10 );
You can custom with your code in function add_custom_notice.
Best regard,
James.
8 years, 9 months ago #7684Now when the site loads I get this:
Parse error: syntax error, unexpected 'Due' (T_STRING), expecting ',' or ';' in /home/ironmts/www/www/wp-content/themes/yolo-sofani-child/functions.php on line 26
That is in line 26, which is the line with the following:
Due to the nature of the medium (metal) each piece has burnishing and shading in different areas of the piece. Click *here* to view a video clip of our art in motion. If you’d like photographs of your exact piece prior to shipping, please utilize the contact form before placing your order.
8 years, 9 months ago #7689This reply has been marked as private.8 years, 9 months ago #7720Thanks James. That worked. Now... (I know...we're annoying sometimes...lol)
Is there any way to make that appear at the BOTTOM of the product description?
Also, I tried putting an href in for the "Click *here* to view a video clip of our art in motion" to go to the YouTube video, but my knowledge is html and that didn't work with the php. How would I do that?
8 years, 9 months ago #7746This reply has been marked as private. -
AuthorPosts
You must be logged in and have valid license to reply to this topic.
