![]() |
Wordpress-different widgets on different pages?
I might be missing something basic here, but is there a way to have different widgets in WP for individual pages? I set up widgets and I set up pages. The same widgets appear on every page. Would be nice to have cam widgets appear on cam page...etc.
|
Yes...you can define multiple dynamic sidebars in your theme. Then you can use some PHP in your theme so that WordPress can determine what kind of page it's delivering, and tell it to deliver a different sidebar based on that.
A lot of themes come with just one dynamic sidebar registered. To add more, you need to be comfortable editing your functions.php file in your theme to register it. This tutorial might get you started: http://www.quickonlinetips.com/archi...press-widgets/ The concept works in WP 2.5 too. Great question! Looking for the answer got me thinking. I think I'm going to create multiple sidebars for my site. I don't want all my categories and monthly archive widgets to show up on post pages (because they make the page unbearably long). = ) --David |
Excellent, great resource there. I usually screw everything up completely when I edit code, although sometimes i actually make backups...:)
|
It's much easier if your not a widget head!
|
I have to bump this thread to say thanks Luscious for asking this question and thanks Hotwives for your answer.
I'm messing around with a new Widgetised theme that has 2 sidebars on the right hand side and I want the sidebars to be different for the post pages. I've tried to call a different sidebar using the template include thing but I can't for the life of me get it to work. The page loads up nicely but the sidebar bit just comes up blank. I like these widget things because I'm still a code nancy at heart although after all this messing about I'm getting the hang of php a bit. Well, up to this point, where I'm just stuffed if I know what's wrong. In any case, I'll have a play with this. And you know what else? I can find answers to my WP questions quicker here than on the official site. |
YAY! I got it to work!!
Group hug. I love you guys. |
Quote:
|
All times are GMT -4. The time now is 07:01 AM. |
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc