Skip to content

Instantly share code, notes, and snippets.

@Sanabria
Created June 11, 2018 20:17
Show Gist options
  • Save Sanabria/3de6aad361a5e18b216d6a6940f56a06 to your computer and use it in GitHub Desktop.
Save Sanabria/3de6aad361a5e18b216d6a6940f56a06 to your computer and use it in GitHub Desktop.
include ACF into Sage 9
/**
* Customize ACF path
*/
add_filter('acf/settings/path', function ( $path ) {
$path = get_stylesheet_directory() . '/../vendor/advanced-custom-fields/advanced-custom-fields-pro/';
return $path;
});
/**
* Customize ACF dir
*/
add_filter('acf/settings/dir', function ( $dir ) {
$dir = get_stylesheet_directory_uri() . '/../vendor/advanced-custom-fields/advanced-custom-fields-pro/';
return $dir;
});
/**
* Hide ACF field group menu item
*/
// add_filter('acf/settings/show_admin', '__return_false');
/**
* include ACF
*/
include_once( get_stylesheet_directory() . '/../vendor/advanced-custom-fields/advanced-custom-fields-pro/acf.php' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment