Plugin Contributor
Sark
(@sarkware)
My bad, it has no example, since it has been added very recently.
The best part is no one asked for it 🙂 , but I thought it will be usefull for someone.
OK here us how it will work.
in your wp-admin go to Fields Factory -> Settings, there find the Fields Location property and set it to Custom Location.
Now you will be shown a Text Box, where you can enter a custom action name.
eg. let say your cusom action is called hey_wcff_inject_the_fields_here enter it on the text box and click on the Saves Changes.
Once done. Open your single-product.php template or any other product template parts that related to single product. there just trigger your custom action whereever you need the fields to be injected.
do_action("hey_wcff_inject_the_fields_here");
SO the point is, this will give you more flexibility to choose the fields location, other then the default actions.
-
This reply was modified 3 years, 8 months ago by
Sark.
It’s obviously a good idea 🙂 I will give it a try. Thanks for the explanation.
Hi,
It’s possible to define the costume location with a shortcode? My theme (avada) has a costume product page layout, I prefer not to edit directly the PHP files.
Thank you
Regards