June 2nd, 2008
Create Dynamic Sidebars
Richard Hooper of WP Project.com has published an interesting post which explains . As it stands, there is no way to assign widgets to only appear on specific pages of your WordPress Powered blog in the back end. Using Richard’s method, you can create your own sidebar.php file and assign various widgets or plugins to only show up on specific sections of your blog. This is great if you want to display a widget on a SINGLE post template versus the front page.
Richard also adds that
Aside from creating a dynamic sidebar, this approach breaks up your sidebar code into smaller, more manageable chunks.
Perhaps we should coax Richard into turning this into a plugin in which normal users can then assign widgets to appear on certain page templates.
Here is a question I have. You can use this method to assign plugins/widgets to appear on page templates, but outside of hardcoding those templates, can you manually assign widgets to appear on certain pages without having to place PHP code into the page itself. For example, if I have an about page, and I have a contact page, is there a way to assign a widget to show up on the about page but not the contact page, even though they are both on the same page template. Does that sort of granularity and control exist?
Related CMS news:
Leave a Reply