Widget Logic
FT had a complex sidebar, but I decided to ‘widgetise’ it when Steve updated the theme in early 2008. To keep some of the special widgets appearing only when needed, I wrote a plugin to extend the functionality of widgets. Widget Logic allows widgets to appear or not depending on standard WP conditional tags, such as is_home() and is_single() and so on.
If you want to contact me about it you should address yourself to the Wordpress org directory and perhaps post on the forum there. Or you can leave a comment here, below.
Alan
Freaky Trigger Theme
This was designed by Steve Mannion
Plugins FT uses
- Akismet (v. 2.1.6 ) by Matt Mullenweg.
- Akismet Must Go (v. 0.1 ) by Alan Trewartha.
- Dashboard: Draft Posts (v. 1.0.3 ) by Viper007Bond.
- Dashboard Widget Manager (v. 1.3.0 ) by Viper007Bond.
- del.icio.us for Wordpress (v. 2.0 ) by Ricardo González.
- Edit Comments (v. 0.3 beta ) by Andrew Sutherland.
- Filosofo Old-Style Upload (v. 0.5 ) by Austin Matzko.
- Get Recent Comments (v. 2.0.2 ) by Krischan Jodies.
- Inline Google Maps 2 (v. 2.1.2 ) by Mikhail Kornienko (mike@macdiggs.com).
- In Series (v. 3.1.0 Beta 5 ) by Travis Snoozy.
- Meet your commenters (v. 1.0 ) by Alberto Varela.
- More fields (v. 0.6.7 ) by Henrik Melin, Kal Ström.
- No Flash Uploader (v. 1.1 ) by Dion Hulse.
- No Self Pings (v. 0.2 ) by Michael D. Adams.
- Official Comments (v. 1.1 ) by Brett Taylor.
- Plugins list (v. 0.2 ) by Davide Benini.
- podPress (v. 8.8 ) by Dan Kuykendall (Seek3r).
- Post-Plugin Library (v. 2.5.0.8 ) by Rob Marsh, SJ.
- Preview Theme (v. 1.0 ) by Dougal Campbell.
- Random Redirect (v. 1.0.1 ) by Matt Mullenweg.
- Role Manager (v. 2.2.2 ) by Thomas Schneider.
- SABRE (v. 0.7.2 ) by Didier Lorphelin.
- ShareThis (v. 2.1 ) by ShareThis and Crowd Favorite (crowdfavorite.com).
- Similar Posts (v. 2.5.0.8 ) by Rob Marsh, SJ.
- Simple SQL admin (v. 0.1 ) by Alan Trewartha.
- Smart Youtube (v. 1.91 ) by Vladimir Prelovac.
- Sticky Fields (v. 1.0 ) by ericdes.
- Top Commentators Widget (v. 0.999a ) by Lorna Timbah (WebGrrrl.net).
- TTFTitles (v. 0.4.2 ) by John Leavitt.
- Twitter Tools (v. 1.1b1 ) by Alex King.
- Widget Logic (v. 0.43 ) by Alan Trewartha.
- wp-cache (v. 2.1.2 ) by Ricardo Galli Granada.
- WP-DBManager (v. 2.30 ) by Lester 'GaMerZ' Chan.
- WP-Polls (v. 2.30 ) by Lester 'GaMerZ' Chan.
- WP-PostViews (v. 1.30 ) by Lester 'GaMerZ' Chan.
- WP Google Analytics (v. 1.2.3 ) by Aaron D. Campbell.
- WP User Manager (v. 0.4 ) by Sugan Shan.

Site powered by
Printer on April 10th, 2008
Hi Steve. Widget Logic looks like a really nice plugin, Will there be an update for WP 2.5? It seems I get an error (in firebug), and no input fieds in my widgets.
FT's Alan on April 11th, 2008
Hi, I am trying to get a 2.5 version working. A bit of me thinks it might not be worth it, as 2.5 allows you to define many more sidebars and configure them in an elegant interface.
BUT to keep FT going and get us on to 2.5 I will get it working asap. (we’re on a patched version of 2.3)
however until podPress updates to working ok with 2.5 i’m not exactly hurrying.
Paul Walker on April 15th, 2008
Just another person chiming in, hoping for a 2.5 compatible update to widget logic. It’s a great plugin…
Luis Enrique on April 27th, 2008
Hey, i’m another one. I hope the widget logic works with wordpress 2.5 version. Please. Is a great pluggin.
The features of Wordpress 2.5 sidebars never will be good than the excelent Widget Logic features.
And you have the only one plugin that can do this, i been searching and i don’t find anything like widget logic.
FT's admin on April 27th, 2008
if you check the official site http://wordpress.org/extend/plugins/widget-logic/ you’ll see i did update the code to be 2.5 compatible
zhrance on April 30th, 2008
Hi there FT, I am wondering what kinda plug-in do you use to get those great highlights in top of your webpage? (europop, poptimism, slugs on the radio) Let me know! :)
FT's admin on April 30th, 2008
the 3 lozenges at the top (europop, poptimims and slugs) don’t highlight tho? they’re just 3 DIVs in the HTML with an onclick:
<div id=’head_europop’ onclick=”location.href=’/europop2008/’” title=”Europop 2008″>16 nations, your votes, EXPECT EMO</div>
and the position and appearance are set in CSS. the HTML (defined in our themes header.php file) and the CSS (in the theme’s style.css file) are tailor made for FT - no plugin. sorry.
zhrance on May 1st, 2008
Tnx for your fast reply. so it’s just html/css… not dynamic?
FT's admin on May 1st, 2008
what is there that you think IS dynamic? the images don’t change. there’s not even a simple roll-over effect on those items.
the category bar (music/tv/games etc) and the functions (random/login etc) now those have some dynamicness that’s done with JS. but again no plugin - custom made code to fit with the theme design.
baron on May 10th, 2008
hi. Thanks for plugin
perfect.
regards
ovidiu on May 15th, 2008
can you help me out with a little logic ;-)
I want a certain widget to be only displayed if its not on a certain page, something like is_not_page(’551′) but I do not know how to write that condition :-(
FT's admin on May 15th, 2008
!is_page(’551′)
i think should do it
ovidiu on May 20th, 2008
thx that worked.
now I have a compatibility problem.
I have 2 sidebars, with both showing on the homepage but only one on all other pages. So I need to use your plugin, to make 2 widgets from sidebar 1 to disappear on the homepage and appear on sidebar 2.
I tried !is_home() for both widgets, but as soon as I save,both conditions disappear. It seems to work fine if I only use this condition on one widget, but as soon as I use this condition ob two widgets, liek I said, the conditions both disappear…
any clue what could be wrong? did you test your plugin in a similar situation?
can you try and use !is_home() on two widgets, and the nsave and see if that works for you?
FT's Alan on May 20th, 2008
(in case you check back, i did reply on the wordpress org forums for you. sorry our server went wobbly when you posted that)
Michelle on May 25th, 2008
Hello, I just wanted to thank you for this plugin. I was at my wits’ end trying to wrangle different sidebars for different parts of my site into order, and this has made everything work like a dream!
Fil on May 25th, 2008
Hi,
thank you so much for this incredible plugin!
I’d like to use it on my website but i have a problem: when i activate the plugin i receive some errors instead the sidebar like this:
Warning: Illegal offset type in /web/htdocs/www.nomesito.com/home/wp-content/plugins/widget_logic.php on line 126
reporting errors in line 126 and 129.
Do you have idea why it happens?
Thank you!
FT's Alan on May 26th, 2008
Looks like you are using a widget that doesn’t play by what i think the rules of widgets are! What widget plugins are you using?
You could also try deactivating each of the widget plugins in turn to see if the problem goes away, then let me know which one causes the problem, and i’ll see what i can do to code around it.
fab on June 15th, 2008
Hi Alan,
thanks for your plugin. I want to use it because of the ttftitle thing, but I don’t know how to use it in this case. What code I have to add in my function.php or elsewhere to display the images?
FT's Alan on June 15th, 2008
There’s code on the other notes page of the plugin page on wordpress.org
use that code, along with an add_filter like it explains, in your themes functions.php and that should do you.
Brent Brigner on June 18th, 2008
Hello
I would love to download your Widget and could you email me the download do you have to pay for it? do you have a 30day free trial?I do not have any assets right now and I am brand new at blogs and I would love more information on your Widget. Thank You for creating this-I sure would love to try it out.
Thank You Brent & Jeannie
FT's Alan on June 19th, 2008
Follow the Wordpress org directory link in the post above - they host the download.
Seth on June 21st, 2008
I’m getting the same warning that Fil did above:
Warning: Illegal offset type in /home/ioventur/public_html/wp-content/plugins/widget-logic/widget_logic.php on line 126
Warning: Illegal offset type in /home/ioventur/public_html/wp-content/plugins/widget-logic/widget_logic.php on line 129
I deactivated all widget plugins and it didn’t fix it but it did work once I changed my WP theme. The them that I was using was semiologic.
Not sure exactly what the issue is with semiologic and your plugin.
Thanks for any feedback.
FT's Alan on June 21st, 2008
I just tried out the semiologic theme (from here and it doesn’t work with WP2.5 very well even without widget logic - when you edit widgets it comes back with messy intermediate pages instead of the proper admin interface. Is there a 2.5 update?
having said that i activated widget logic and i didn’t get your error right away, so it’s not as simple as Wp2.5 + SL theme + WL plugin = error. :-/ any more info gratefully received.
theSL theme is quite complex and does do a lot of custom things to widgets: killing off WP’s built in widgets! and adding a ‘context’ option - a bit like what WL tries to do, and in a similar manner, but in a pre-2.5 manner.
TRY THIS THOUGH:
Look in semiologic/admin/widgets.php file, find “add_action(’init’, ’sem_widget_controls_init’);” and comment it out with a “#” at the start of the line. It looks like this deactivates semilogic theme’s “widget context” controls and stops clashing with widget-logic.
It might disable other things - i just don’t have the time to check. But let me know how you get on.
Max on July 1st, 2008
Very useful information. Thanks!!
Ana Hernandez, CEO netrageouz.net on July 8th, 2008
great plug in ideas Alan! I’m always looking for ways to facilitate networking with like-minded individuals. I especially appreciate unique tools that help me harness the power of web 2.0 and social bookmarking sites so I can make good use of my time. There’s nothing worse than spending countless hours online to build your online presence, while losing valuable time that you could be spending with your friends and family. Luckily, I’ve found tons of useful tools to meet like-minded individuals and network super efficiently. In this age of user generated content driving up a website’s ranking, content is king and getting that content in front of the right people is the name of the game! Keep up the great blog.
—
Ana Hernandez, CEO Netrageouz.net
http://www.netrageouz.net/toolbox.htm
STS on July 9th, 2008
Hi,
great plug-in! Can you help me?
I try to hide the Categories Widget just from one page (id172)and show it on all other pages of the website.
What is the code?
Thanks !
FT's Alan on July 9th, 2008
look at the examples on http://wordpress.org/extend/plugins/widget-logic/other_notes/
hershal on July 21st, 2008
I was wondering how to get a widget to appear on multiple pages by indicating which specific page id’s i want the widget to appear on. how is this done?
Philix on July 24th, 2008
This is a great plug in :)
FT's Alan on July 24th, 2008
@ hershal
you could use PHP’s logical OR operators like this
is_page(’about-me’) || is_page(’42′) || is_page(’About Me And Joe’)
or if you read http://codex.wordpress.org/Conditional_Tags you’ll see you can do the slightly more PHP-savvy but simpler
is_page(array(42,’about-me’,'About Me And Joe’))