Freaky Trigger’s WordPress Setup
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. PLEASE READ THE FAQ AND OTHER NOTES in the WordPress plugin directory first though.
If you find Widget Logic useful to you, then you could consider a small donation to Cancer Research UK – click ‘Donate’ on the widget over to the right there –>
VIDEO TUTORIAL! Popup or view on YouTube a screencast by Daryl Lozupone. Thanks to him.
Podcast Channels
Podcast Channels is a plugin that augments WP’s RSS feed with some extra elements, mostly in the ‘itunes’ namespace. It works with existing features of WP (auto-enclosures and the media library) to make a simple way to podcast, and allows different metadata in different RSS feeds – you can have as many channels as there are categories, tags, even blog authors.
Like a lot of people I found PodPress increasingly frustrating to use around WP2.6. I still see lots of people using it, but I found it was interfering with too many aspects of WP – wysiwyg editing, the media library, and so on. But there were only two things it did that I liked – show download stats, and allow multiple podcasts on a blog with their own rss and iTunes metadata. So i wrote a couple of plugins to target just those functions.
(I may release the stats plugin some day, but it’s nothing special, a bit clunky, and I really don’t want to support it.)
Freaky Trigger Theme
This was designed by Steve Mannion @ base58.com
Plugins FT uses
- Akismet by Automattic
- Cimy User Extra Fields by Marco Cimmino
- Contextual Related Posts by Ajay D'Souza
- Edit Comments by Andrew Sutherland
- FT Combo by Alan Trewartha
- Get Recent Comments by Krischan Jodies
- Google Custom Search Plugin by Aleem Bawany
- MediaElement.js - HTML5 Audio and Video by John Dyer
- More Fields by Henrik Melin, Kal Ström
- Organize Series by Darren Ethier
- Podcast Channels by Alan Trewartha
- Revision Control by Dion Hulse
- SABRE by Didier Lorphelin
- Widget Logic by Alan Trewartha
- WP-DBManager by Lester 'GaMerZ' Chan
- WP-Polls by Lester 'GaMerZ' Chan
- WP-Polls Widget by Lester 'GaMerZ' Chan
- WP-PostViews by Lester 'GaMerZ' Chan
- WP Google Analytics by Aaron D. Campbell
- WP No Category Base by iDope
wow, look at all of them. FT salutes you
admin in • 124,654 views

I’m trying to write some conditional statements and I’m having trouble combining statements. Do you have examples of combining statements???
Hy there,
this is a great plugin to easy manage the widgets on my website.
But im aving problems to put 1 widget happering in the categorys…
home(), pages(), is_single() works just fine… but when i try to put on category it dosent hapear anything. And i dont knwo where the problem may be.
Can u help finding the problem here?
thx
what logic are you using to identify a category?
Good day and happy new year!
I too am delighted with your widget-logic plug-in, and it is working very well allowing me to display social icons only on defined pages. But, I am also trying to restrict a series of RSS feeds to a single page.
I am in WP 3.0.4, and I CAN display more than one feed in a page through the WP base framework–I am NOT using an additional RSS plugin or widget plug-in,– but I cannot get widget-logic to restrict those feeds to a dedicated page. Is there something “extra” I must do, or is there something inherently conflicting between feeds and the plug-in? I am using the conditional is_page(‘Name of Page I Want the Widget On’)
Your consideration is much appreciated. Thank you and best wishes!
S.W.
PS to RSS Q:
By the way, I wish to come back and say that I CAN restrict the feeds to the homepage using is_home(). But, I want to restrict the feeds to another page. I have tried writing the page name in the conditional to be case sensitive as they are written in the navigation menu, to be all lower case, and to place dashes between each word in the title. None work. Am I missing something? Thank you, again! / S.W.
Sigh…sorry to clutter your board! I have just found that the plug-in also will not work with a simple text field in that widget area. Could there be something wrong with the widget code itself or its interaction with the plugin? I have no idea how to check for this or even what to do if I found a problem. I am so sorry for the hassle. I hope you are still checking this board! Cheers!
Hi there! I’m at work surfing around your blog from my new iphone! Just wanted to say I love reading your blog and look forward to all your posts! Keep up the great work!
I get how to use Widget Logic to allow widget to conditionally *appear* on specific pages, but what conditional tags exist to *suppress* a widget from appearing on specific pages? For example, I want a widget to appear on every page except for, say, the “About” page. What is the conditional tag to suppress a widget from displaying on only that one page?
Thanks.
After thought to my initial post…
Right now I’m thinking the workaround is to use an array with is_page() to include all the pages (except the one(s)) that I want the widget to appear on. Please tell me there’s a better solution. ;-)
I figured it out the solution to my original inquiry:
! (is_page('about'))
Thanks!
Oh, geeeeeeze! I was just at the Widget Logic plugin site on WordPress and saw the examples. Turns out the solution is even slightly simpler than what I posted.
!is_page('about')
The ironic thing is that the example is the same example I inquired about. LOL! :-)
=Jeff
Not sure if someone allready has reported but when wp-debug is set to true
Notice: Undefined index: callback_wl_redirect in /httpdocs/wp-content/plugins/widget-logic/widget_logic.php on line 137 appears manytimes
100k downloads from WP.org, and 250 quid raised for charity.
i really must put in all those little tweaks and improvements suggested in the comments above – for which many thanks everyone.
I have no problems using single words example: in_category(Education) , but when I try using Health & Fitness, in_category(Health & Fitness), it doesn’t show-up in my side bar.
Any clue?
Thanks
Lloyd
http://codex.wordpress.org/Template_Tags/in_category seems to think that should be fine (so long as you are putting in the quotes). to troubleshoot you could try putting in
print_r( wp_get_object_terms( $id, ‘category’))
in your code, where $id is any post ID in the category you are having problems with. This will print an array of varying IDs and strings that you can use to match that post with in_category(X).
Thanks so much for your response, I made a simple change and it worked:
Health & Fitness
to
Health-Fitness
Thanks
Lloyd
Hello to all, i’m looking for a solution on my website http://www.lovingragusatravel.com
As you can see, my home page redirect on two different section of the website, translated with ZDMultilang plugin
http://www.lovingragusatravel.com/it and http://www.lovingragusatravel.com/en
(i’m translating in this days)
What i’m looking for is a conditional tag that select the widgets for each language, showing respectively the italian widget when user navigate through the italian section, and the respective for english.
I can’t use categories or IDpage beacuse ZDM plugin maintain the same Id page and only add “en” or “it” after the home page URL
Some workaround for this?
Thank’s for your help.
geris
i don’t know that plugin well, but the FAQ implies you can get the locale code with the function zd_multilang_get_locale()
so try zd_multilang_get_locale()==’it’
etc
One of the better plugins, thanks.
Just spent the best part of 6 hours looking through a load of widgets, switching widget-logic on and off, to discover a rogue – instead of _ and a mispelled !is_archives() instead of !is_archive()
the background colours of the theme (this-just-in) had disappeared, very strange anyway i digress cheers
Hello,
I have activated the Widget Logic AND TTF Title plugins in the hopes of replacing widget titles with images.
I’ve been at it for days but just can’t seem to get it no matter what snippet I try (or where I try to put it).
I am using the 2010 Weaver theme.
http://www.homestilo.com is the site.
ANY help/insight would be much appreciated!!
Have you put the example code on http://wordpress.org/extend/plugins/widget-logic/other_notes/ in your theme’s functions.php file?
Hi Alan,
I have tried that. I have activated the ‘widget_content’ filter. I have also tried activating the ‘wp_reset_query’ fix.
I have tried putting the example code into the functions.php file, also a 2010functions.php file that is there AND a section that the theme has for pasting snippets.
The theme is a child theme of Twenty Ten.I thought that may be a reason why it isn’t working. So I tried activating Twenty Ten and placing into that functions.php file. Nada. I’m stumped.
the wp_reset_query option is not relevant here – so forget that.
the add_filter line and ttftext_widget_title function need putting in just once in the theme’s functions.php file – if you have it multiple times you will probablt end up with errors.
troubleshooting steps you could try that I can think of.
first check ttftitles is working ok. put
the_ttftext( “test text”, true )
somewhere in your theme’s php, or in a php widget perhaps. that will output a gif of ‘test text’ in the default style.
if that’s OK, then change the widget content filter to something more basic like:
function ttftext_widget_title($content=”)
{ return “WIDGET CONTENT FILTER IS WORKING”.$content;
}
to add that text before every widget. Also just to check you are using actual widgets – not the theme’s default sidebar appearances – the widget_content filter only works on the widgets you configure in admin ‘appearance > widgets’
if none of that helps, i don’t know what else I could offer other than to get stuck in to your server myself.
Hello Again,
In the end it was so simple I could kick myself. Basically, it was the code that you suggest all along. BUT I had to replace wherever it read h2 to read h3.
Thanks again for all the help and the great plugin!
ha ha! yes that would do it! i should add a note to the effect that you need to adapt that code to the specifics of your theme. cheers, and i’m glad it worked out for you.
A