Hi, first congratulations about the great v5 update. I’m trying to implement it in a theme. I didn’t have problems with the old version but now there is something quirky going on. I’ve copied the plugin to the main theme directory in a folder named acf and included it:
add_filter('acf/settings/path', 'my_acf_settings_path');
function my_acf_settings_path( $path ) {
$path = get_stylesheet_directory() . '/acf/';
return $path;
}
add_filter('acf/settings/dir', 'my_acf_settings_dir');
function my_acf_settings_dir( $dir ) {
$dir = get_stylesheet_directory() . '/acf/';
return $dir;
However when I enter the Custom Fields panel in the admin dashboard and click the Add New button next to the Field Groups title (see field_groups.png), the panel looks very strange. See the attached add_new_field.png. And it’s not functioning properly – “Add Field” button is not working, neither are options appearing for the different field types. Publish is also not saving the current field.
That may be the cause of this?
Oh, I changed
$dir = get_stylesheet_directory() . '/acf/';
to
$dir = get_stylesheet_directory_uri() . '/acf/';
and it works. I’m stupid..