-
AuthorPosts
-
September 1, 2016 at 11:28 am #1157104
hello,
how or what is the easiest (best?) way to add custom headlines (or just html) BELOW entry-wrap and ABOVE entry-content?
I’m guessing to use child theme to add custom code?
or maybe add in function.php, the ability to add html in the correct spot PER PRODUCT I want to add html to?
any help, code, or places to add code would be appreciated
🙂September 1, 2016 at 11:44 am #1157132Hi there,
Thanks for writing in! To assist you with this issue, we’ll first need you to provide us with your URL. This is to ensure that we can provide you with a tailored answer to your situation. Once you have provided us with your URL, we will be happy to assist you with everything.
September 2, 2016 at 1:08 pm #1158730https://www.cowgirlsandlace.com/shop/tyler-wash/
thanks
SO I want a custom/unique headline on this page 🙂
thanksPS. I would LOVE, LOVE to put this headline, style it via a field somewhere…
so I could add the headline quickly, easily…thanks
September 2, 2016 at 5:13 pm #1159008Hi there,
Head over to X Addons section and install ACF Pro plugin and then create a custom field (Custom Fields -> Add New | https://snag.gy/DE8bQj.jpg). Set Rule option as Product (https://snag.gy/bNRSvm.jpg) and create a custom field as follows (https://snag.gy/rSbdAc.jpg).
Now you can Edit a Product and set your Custom WooCommerce Title (https://snag.gy/5FJEtp.jpg)
Because this requires a template change, I’d advise that you setup a child theme. This allows you to make code changes that won’t be overwritten when an X update is released. After your child theme is setup, please review how we recommend making template changes in Customization Best Practices.
Then add the following code into your child theme’s functions.php file.
// Add ACF Info to Product display page add_action( 'woocommerce_before_single_product_summary', "My_ACF_product_content", 10 ); function My_ACF_product_content(){ if(get_field('my_woocommerce_title')) { echo "<h5>" . get_field('my_woocommerce_title') . "</h5>"; } }
Hope that helps.
-
AuthorPosts