- This topic has 11 replies, 2 voices, and was last updated 6 years, 4 months ago by
Tom.
-
AuthorPosts
-
September 27, 2016 at 6:53 am #229785
Thierry
Hello,
I use ACF and this plugin : https://wordpress.org/plugins/loushou-acf-for-woocommerce/
Ok for the back-office but how i display in front, wath’s the hook ?
Thx
September 27, 2016 at 8:45 am #229809Tom
Lead DeveloperLead DeveloperWhere are you trying to display your field?
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentSeptember 27, 2016 at 10:18 am #229817Thierry
In the content with GP hooks “Inside Content Container”
but i think that is not the god thing with Woocommerce
September 27, 2016 at 10:30 pm #229985Tom
Lead DeveloperLead DeveloperShould work fine inside WooCommerce – that hook exists.
What are you adding to it?
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentSeptember 28, 2016 at 9:08 am #230115Thierry
A pdf file for download.
How i can work with the hook WooCommerce ? i use GP hooks or i copy a template of WooCommerce and i modify single-product.php ?
September 28, 2016 at 12:02 pm #230142Tom
Lead DeveloperLead DeveloperYou can use GP Hooks, this would only show on WooCommerce templates for example:
<?php if ( function_exists( 'is_woocommerce' ) ) : if ( is_woocommerce() ) { ?> Text here will only show on WooCommerce pages <?php } endif; ?>
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentSeptember 30, 2016 at 12:53 am #230563Thierry
Thank you Tom.
Have you the same help for the WooCommerce pages ?
September 30, 2016 at 8:55 am #230666Tom
Lead DeveloperLead DeveloperAll of those hooks apply to WooCommerce as well as any other page.
The code I provided above will make it so any code inside it will only apply to WC pages.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentSeptember 30, 2016 at 9:22 am #230680September 30, 2016 at 4:24 pm #230788Tom
Lead DeveloperLead DeveloperAh, you’ll have to ask WooCommerce if an action (hook) exists there.
If it does, you’ll need to write the function, as only GP hooks are available in GP Hooks.
This should help when it comes to writing a function: https://generatepress.com/knowledgebase/hook-list/
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentOctober 1, 2016 at 1:50 am #230847Thierry
I understand, thank you Tom
October 1, 2016 at 9:33 am #230934Tom
Lead DeveloperLead DeveloperNo problem 🙂
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-development -
AuthorPosts
- You must be logged in to reply to this topic.