Last active
August 29, 2015 14:16
-
-
Save daronspence/d86049809d03c4906a94 to your computer and use it in GitHub Desktop.
How to include widgets through a plugin or theme files.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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