ThemeShaper Forums » Thematic

[closed]

Removing Multiple Widget Areas

(4 posts)
  • Started 9 years ago by Mischif
  • Latest reply from Mischif
  • This topic is resolved
  1. Like the title says, I'm trying to remove most of the widget areas in my theme. I'm currently using the code:

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

    With the corresponding function call, but it gives me an error about expecting a bracket and getting a comma. Am I going to have to make separate unset calls for each area?

    Posted 9 years ago #
  2. You mean remove them so they dont show up on the site or so that they dont show up under the wordpress widget control?

    Posted 9 years ago #
  3. Hi,

    try this code:

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

    Chris

    Posted 9 years ago #
  4. That did it, thanks!

    Posted 9 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.