public
Last active

Unregister widgets from loading on your site using the Genesis Framework.

  • Download Gist
functions.php
PHP
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
<?php
//* Do NOT include the opening php tag
 
//* Remove Featured Page widget
add_action( 'widgets_init', 'remove_featured_page_widget', 20 );
function remove_featured_page_widget() {
unregister_widget( 'Genesis_Featured_Page' );
}
 
//* Remove Featured Post widget
add_action( 'widgets_init', 'remove_featured_post_widget', 20 );
function remove_featured_post_widget() {
unregister_widget( 'Genesis_Featured_Post' );
}
 
//* Remove User Profile widget
add_action( 'widgets_init', 'remove_user_profile_widget', 20 );
function remove_user_profile_widget() {
unregister_widget( 'Genesis_User_Profile_Widget' );
}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.