The Widget Contexts plugin for WordPress lets you precisely select which widgets are displayed depending on the page that is being visited.
- Front Page — Applies to your site's front page.
- Blog on a Static Page — Applies to your blog page, in the event it is not your site's front page.
- Post — Applies to blog posts when they're browsed individual.
- Attachment — Applies to attachments, e.g. images when browsing a gallery.
- Category Archives — Applies to category archive pages.
- Tag Archives — Applies to tag archive pages.
- Author Archives — Applies to author archive pages.
- Date Archive — Applies to date archive pages.
- Name of Section — Applies to that static page, and all of its children.
- New Section — Applies to newly created sections, i.e. new static pages with no parent.
- Name of Template — Applies to static pages that use that template (overrides the section's context if any).
- Search Results — Applies to search results.
- Not Found Error (404) — Applies to 404 error pages.
The Special template
Typically, it is applied to "stub" pages (static pages that merely contain a Silo Stub widget, which lists that page's child pages, such as this site's software section). It comes in handy if you wish these stub pages to have a different set of widgets from leaf pages (which contain your meaty articles).
If that is what you wish to achieve, proceed as follows:
- Create your section, and its subsections if applicable.
- Assign the Special template to each of them.
- Create the articles that go within it.
Then, configure widgets' contexts:
- Use the Special template's context to configure how your stub pages should display.
- Use that section's context to configure how its articles should display.
If, for any reasons, you need more than one special template, create a copy of the theme's special.php file. Edit it using a text editor (such as NotePad), and change the template's name. Upload it to your theme's folder, and WordPress will detect it automatically.
Another place where the Special Template can come in handy is if you organize your site as follows:
- / — The front page.
- /blog/ — The blog page, with your posts.
- /blog/archives/ — An archive page.
Archives and Semiologic SEO
When using the Semiologic theme and Semiologic SEO plugin together, some or all of your archives-related contexts will become irrelevant in the "Each Entry" panel. If you wish to have full control of these archive pages, configure them to display excerpts instead of lists of post titles, under Settings / SEO.
This package is part of Semiologic Pro, and is access-restricted.
Bleeding Edge Zip
Frequently Asked Questions
The Semiologic forum is the best place to report issues.
I need a context for this specific category!
It's not implemented, for three reasons:
First and foremost, the odds are you should be using static pages for what you're doing.
Second, the odds are you're also using one of /%postname%/ or /%category%/%postname%/ permalink structure, as recommended in a random "SEO tips" post. The truth is, those two permalink structures can have a severe performance impact on your site — I've seen it bring a bi-Xeon server with moderate traffic to a crawl.
Last, but not least, doing so would introduce performance problems in the WP Widgets UI .
- Fix svn versioning issue
- Correct unknown index warnings
- WP 3.5 compat
- Recoded for removed _get_post_ancestors function
- Fixed section toggles in customize to uncheck all. Requires use of .prop instead of .attr with jQuery 1.6+
- Change unexpected behavior (page sections vs page template).
- WP 3.0 compat
- Cache improvements
- WP 2.9 compat
- Complete Rewrite
- Code enhancements and optimizations
- Use WP_Widgets