Strict Standards: Redefining already defined constructor for class bbdb in /home/themes/public_html/forums/bb-includes/db-mysql.php on line 12

Strict Standards: Declaration of BB_Walker_Blank::start_lvl() should be compatible with BB_Walker::start_lvl($output) in /home/themes/public_html/forums/bb-includes/classes.php on line 1127

Strict Standards: Declaration of BB_Walker_Blank::end_lvl() should be compatible with BB_Walker::end_lvl($output) in /home/themes/public_html/forums/bb-includes/classes.php on line 1127

Strict Standards: Declaration of BB_Walker_Blank::start_el() should be compatible with BB_Walker::start_el($output) in /home/themes/public_html/forums/bb-includes/classes.php on line 1127

Strict Standards: Declaration of BB_Walker_Blank::end_el() should be compatible with BB_Walker::end_el($output) in /home/themes/public_html/forums/bb-includes/classes.php on line 1127
Remove/ unregister widget from admin panel and theme « ThemeShaper Forums

ThemeShaper Forums » Thematic

[closed]

Remove/ unregister widget from admin panel and theme

(4 posts)
  • Started 4 years ago by mirko77
  • Latest reply from helgatheviking
  • This topic is not resolved

  1. Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 440

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 510

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 512


    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 440

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 510

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 512
    mirko77

    Member

    I have been trying to remove some default widgets both from the admin panel and my default child theme with no luck.

    For example, I added a search bar next to my main navigation through code and I would like to remove completely the "Search" widget.

    I tried to remove these lines from widgets-extensions.php:

    // Finished intializing Widgets plugin, now let's load the thematic default widgets
    
    	register_widget('THM_Widget_Search');
    	register_widget('THM_Widget_Meta');
    	register_widget('THM_Widget_RSSlinks');
    
    	// Pre-set Widgets
    	$preset_widgets = array (
    		'primary-aside'  => array( 'search-2', 'pages-2', 'categories-2', 'archives-2' ),
    		'secondary-aside'  => array( 'links-2', 'rss-links-2', 'meta-2' )
    		);

    but nothing changed.

    Any suggestion would be very much appreciated

    Posted 4 years ago #

  2. Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 440

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 510

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 512


    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 440

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 510

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 512
    candregg

    Member

    I have had the same problem. Used the code below in my functinos file:

    ///* Defining Widget Areas */
    function remove_widget_areas($content) {
    unset($content['Index Top']);
    unset($content['Index Bottom']);
    unset($content['Index Insert']);
    unset($content['Single Top']);
    unset($content['Single Bottom']);
    unset($content['Single Insert']);
    unset($content['Page Top']);
    unset($content['Page Bottom']);
    return $content; }

    add_filter('thematic_widgetized_areas', 'remove_widget_areas');

    It had absolutely no effect on the number of widgets showing in the admin area.

    Any help from the moderator would be apreciated.

    Posted 4 years ago #

  3. Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 440

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 510

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 512


    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 440

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 510

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 512
    davelandon

    Member

    /* Defining Widget Areas */

    function remove_widget_areas($content) {
    unset($content['Primary Aside']);
    unset($content['Secondary Aside']);
    unset($content['1st Subsidiary Aside']);
    unset($content['2nd Subsidiary Aside']);
    unset($content['3rd Subsidiary Aside']);
    unset($content['Text Top']);
    unset($content['Index Insert']);
    unset($content['Index Bottom']);
    unset($content['Single Top']);
    unset($content['Single Insert']);
    unset($content['Single Bottom']);
    unset($content['Page Top']);
    unset($content['Page Bottom']);
    return $content;
    }
    add_filter('thematic_widgetized_areas', 'remove_widget_areas');

    This should remove all pesky default widgets within Thematic.

    Posted 4 years ago #

  4. Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 440

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 510

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 512


    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 440

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 510

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 512
    helgatheviking

    Moderator

    @dave your solution is perfect for unregistering widget areas. i believe the OP from 4 months ago wanted to remove the actual widgets. in which case the first result in google reveals:

    function unregister_problem_widgets() {
    unregister_sidebar_widget('Calendar');
    unregister_sidebar_widget('Search');
    }
    add_action('widgets_init','unregister_problem_widgets');

    from:
    http://bookmarks.honewatson.com/2008/04/22/unregister-widgets-in-wordpress-functionsphp-file/

    Posted 4 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.


Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method GA_Filter::spool_analytics() should not be called statically in /home/themes/public_html/forums/bb-includes/wp-functions.php on line 586

Strict Standards: Non-static method GA_Filter::spool_this() should not be called statically in /home/themes/public_html/forums/my-plugins/googleanalytics.php on line 183