Skip to content

Instantly share code, notes, and snippets.

@alexanderdejong
Forked from Sanabria/filters.php
Created July 23, 2019 11:41
Show Gist options
  • Save alexanderdejong/1a9515db7f7cebf6a14edb85eb4d003a to your computer and use it in GitHub Desktop.
Save alexanderdejong/1a9515db7f7cebf6a14edb85eb4d003a 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