Home › Forums › ACF PRO › Integrate ACF PRO in a theme › Reply To: Integrate ACF PRO in a theme
I am having the same problem, I’m including the plugin in my theme as below:
/* Include Advanced Custom Fields */
include_once("_includes/acf-pro/acf.php");
add_filter('acf/settings/path', 'my_acf_settings_path');
function my_acf_settings_path( $path ) {
// update path
$path = get_stylesheet_directory() . "/_includes/acf-pro/";
// return
return $path;
}
I have also tried get_template_directory_uri()
and get_bloginfo('stylesheet_directory')
.
The plugin is included and activated but I am getting 404 erros for the ACF stylesheets. This happens if (as above) I define the filter underneath the include function. If I put the filter above it then Custom Fields dissappears from the WP admin sidebar.
It works fine if I put the folder in plugins but this is not ideal.
Please help!
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.