Include the add-on to theme
-
I included ACF plugin to my theme due to this instruction:
https://www.advancedcustomfields.com/resources/including-acf-in-a-plugin-theme/Now when I try to include files of the addon, the addon doesn’t work.
I use the code:
add_action('acf/register_fields', 'my_register_fields'); function my_register_fields() { include_once('acf-image-crop/acf-image-crop.php'); }
I see the errors in console:
Failed to load resource: the server responded with a status of 403 (Forbidden) https://domain.loc/wp-content/plugins/E:/OpenServer/domains/domain.loc/wp-content/themes/custom-wtheme/acf-image-crop/js/input.js?ver=4.4 Failed to load resource: the server responded with a status of 403 (Forbidden) https://domain.loc/wp-content/plugins/E:/OpenServer/domains/domain.loc/wp-content/themes/custom-wtheme/acf-image-crop/css/input.css?ver=4.4 Failed to load resource: the server responded with a status of 403 (Forbidden)
If I fixed the path error to the files it is doesn’t work too.
When I added the addon like plugin, the addon works good.
- The topic ‘Include the add-on to theme’ is closed to new replies.