Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
How to include widgets through a plugin or theme files.
add_filter( 'acfw_include_widgets', 'add_include_widgets' );
function add_include_widgets(){
$acfw_widgets = array(
array(
'title' => 'Test Widget 1',
'description' => 'A widget test from functions.php',
'slug' => 'test-widget',
'id' => 'Test_Widget',
),
array(
'title' => 'Test Widget 2',
'description' => 'A second widget test from functions.php',
'slug' => 'test-widget-2',
'id' => 'Test_Widget2',
),
);
return $acfw_widgets;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.