Skip to content

Instantly share code, notes, and snippets.

@martylouis
Last active August 29, 2015 14:07
Show Gist options
  • Save martylouis/a40884dcf16fb625e04b to your computer and use it in GitHub Desktop.
Save martylouis/a40884dcf16fb625e04b to your computer and use it in GitHub Desktop.
Advanced Custom Fields 5.0 Config
<?php
/**
* Advanced Custom Fields 5.0 Config
*/
$acf_path = 'acf.php';
require_once $acf_path;
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_uri() . '/acf/';
return $dir;
}
// Show Custom Field menu only locally
if ( WP_ENV === 'production') :
add_filter('acf/settings/show_admin', '__return_false');
endif;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment