Widget Contexts
Widget contexts let you control when widgets display on your site.
Available Widget Contexts
Home
This context applies to your site's front page.
Depending on your setup, this will be the blog's main page or a static front page. In the latter case, it will override any template-specific context.
Blog on a Static Page
This context applies to your blog's front page, in the event that you've set up a static front page. Ignore it if you haven't.
Post
This context applies to individual posts.
Page
This context lets you set the defaults for newly created sections.
Section / Name
This context applies to that static page, and to all of its children.
Template / Name
This context applies to static pages that use that template, and overrides the section-specific context.
Note that the Sales Letter template in the Semiologic theme features no header, no footer, and no sidebars. For this reason, the context isn't available in these areas.
Attachment
This context applies to attachment pages, which are created by WordPress when you use the media uploader.
Category
This context applies to category pages.
Tag
This context applies to tag pages.
Archive
This context applies to other archives pages.
Search
This context applies to search result listings on your site.
404 Error
This context applies to 404 Error: Not Found pages.
Widget Contexts Best Practices
Here's how I'm using the feature on this site:
Section Stubs
Each section has branch pages (Resources, Resources / Widgets) that use the "Special Page" template from the Semiologic theme.
These are stub pages who are only present for the sake of organizing the site. Their content is, for the most part, automatically generated using Silo Stubs.
I didn't see much point in configuring these stub pages differently from a section to the next, so I felt happy to control them all using a single context: Template / Special Page.
Section Pages
Their leaf pages (Resources / Widgets / Widget Contexts ) use the default template, and thus their section's context.
This allows me to put toggle widgets on and off depending on the sections.
Other Special Pages
A few other branch pages (Archives) use the default template, and thus their section's context.
While we're on the topic of archives pages, note that by combining widget contexts and inline widgets, you probably won't ever need to use an Archives template or a Links template.
The Archives template can nonetheless come in handy if you organize your site as follows:
/(a static front page)/blog/(a static page for your blog)/blog/archives/(a custom-designed archives page)
The Links template becomes useful if you want to spread links pages all over the place, and still have them look all alike from a section to the next. (Much like I do with my above-mentioned section stubs.)
Frequently Asked Questions
Some widget contexts don't work!
If you're using the Semiologic SEO plugin, your preferences (Settings / SEO) may be so that these contexts, all in the Each Entry panel, are ignored:
- Category
- Tags
- Archives
- Search
That is because you've configured Semiologic SEO to assist you in fighting duplicate content on your site.
I Need More Static Pages Contexts
You can add new ones by creating new static page template files.
Assuming you're using the Semiologic theme, drop a copy of the special.php file in the theme's folder. Open it in a text editor such as notepad, change the template name, and you're done.
I'd Like a Context For This Specific Category
The short answer is you cannot, and this won't be available any time soon.
Plus, you probably shouldn't be using posts for what you're seeking to achieve.


