Home › Forums › General Issues › Issues with wp-content directory outside core directory › Reply To: Issues with wp-content directory outside core directory
I just managed to figure this one out, I too use the same method with sub modules.
The function you replace in the acf.php passes __FILE__ so will always return the folder of the advanced-custom-fields plugin folder. If you are using a subsequent plugin (in my case acf-repeater), which loads js/css with the same file name – it will result in the js loading twice.
You need to pass the $file
argument into the plugin_dir_url
function like so:
function helpers_get_dir( $file )
{
return plugin_dir_url($file);
}
Hope this helps!
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.