Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Sidebars & Widgets (http://forum.bytesforall.com/forumdisplay.php?f=14)
-   -   Different widgets showing up on different pages. (http://forum.bytesforall.com/showthread.php?t=5854)

ThaddeusB1 Feb 12, 2010 01:47 PM

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....?

juggledad Feb 13, 2010 05:33 AM

check out some of the widget logic plugins

ThaddeusB1 Feb 15, 2010 11:23 AM

Thanks I'll take a look.

Toby Feb 22, 2010 02:00 PM

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.

juggledad Feb 22, 2010 04:04 PM

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.

Toby Feb 22, 2010 04:30 PM

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.

ThaddeusB1 Mar 4, 2010 09:46 AM

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?

juggledad Mar 4, 2010 02:54 PM

ThaddeusB1 - where are you using that code?

ThaddeusB1 Mar 24, 2010 03:35 PM

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.