Different widgets showing up on different pages.
I use Twitter and Facebook feeds in the side bars on my site. I would like to have the feed coincide with the category on the Category page. It seems the easiest thing to do is to set the Right Side Bar to run on the main page and the Right Inner Side Bar to run on the Category page. I could load separate widgets for the separate pages into the specific side bars. This seems like a simple initial solution...
What if I have more than two Category pages? Is the best solution to use a separate Side Bar for each Category, or can I somehow code the widgets to load by page? If page### the load Widget1....? |
check out some of the widget logic plugins
|
Thanks I'll take a look.
|
Reading this thread clued me in to the Widget Logic add-on and it works great for applying a widget item to single pages or categories.
One question though --- can an item be set for more than one page, and if so, what's the syntax that goes in the Widget Logic box? If I type in is_page('Home') it works fine for that one page. If I try adding another page it all messes up. |
check out http://codex.wordpress.org/Conditional_Tags
is_page(array(42,'about-me','About Me And Joe')) Returns true when the Pages displayed is either post ID 42, or post_name "about-me", or post_title "About Me And Joe". Note: the array ability was added at Version 2.5. |
Thanks, JD, that looks like what I'll need.
And thanks for the conditional tags link. When you're new to this like I am, "conditional tags" is not necessarily a term you clue in to. I really don't get php. I've only learned how to get around in HTML. |
I am using !is_category(83) to remove widgets on a specific page. It works perfect in the right side bar, but seems to have no effect on the Left sidebar. Is this because the page calls the left sidebar before it starts the loop?
|
ThaddeusB1 - where are you using that code?
|
I am using that code in the widget box, in the Widget logic box where it asks for the code. If the widget is in the Right sidebar the code works and the widget appears(or not) correctly, but when located in the Left sidebar, the logic does not have any effect.
This led me to think that the code was calling for the side bar, pulling general widgets, before running the loop which identifies the page as a category page... |
All times are GMT -6. The time now is 01:55 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.