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,691 views

Alan, also for example on the individual tours this sidebar is over-writing the key information on the tours too…
http://www.egypttodaytravel.com/index.php/2012/01/tours-of-egypt/abu-simbel-sun-festival-7-nights-tour-programme-including-nile-cruise/ and so I need to take them off there also.
Thanks again, Eileen xx
you mentioned trying is_front_page(), but not is_home() so try that
http://codex.wordpress.org/Conditional_Tags#The_Main_Page
Alan! you are my hero!
First of all when I did is_home() it didnt work, it took itcompletely off the home page as well, and I had tried it before and the same thing had happened. However this time I did it again following your advice but also I checked the box …. Use ‘wp_reset_query’ fix [save] and WOOHHOOO it worked! I cant thank you enough Alan.
I have also tried putting or is_page() but that takes it off the home page as well again, so I will not push my luck any more :-) I am just delighted that at least I got it on the home page and I can play around with it further later on. For now, it has definately fixed the problem.
I am so so glad I found this site, you are all fantastic to help us all out like this.
Well done freaky trigger!! I am going to make a donation right now.
And Alan! I cannot thank you enough.
Have a brill weekend!
Eileen xxx
Thanks for the donation!
kalki story
How do I add widgets on multiple pages? I wanted to have it on is_front_page() and also on other page?
You can use || between 2 tests to check if either test A or test B are true, e.g. is_front_page() || is_author(‘alan’)
http://wordpress.org/extend/plugins/widget-logic/other_notes/
Just upgraded to Widget logic version 0.51 and suddenly we have ‘META’ and ‘ARCHIVES’ on our home page — but nothing like these in our widgets – how do we hide these? where did they come from?
Solved with adding a blank text widget with blank ‘Widget logic’ to our sidebar then they go away – is it possible version 0.51 now somehow adds a default ‘META’ and ‘ARCHIVES’ when no widgets set on the home page..?!
P.S. we hide our widgets from certain pages using ‘Widget logic’ !is_page( array( 188, 282 ) )
Not quite. Your theme has default sidebar contents when there are no widgets. The new WL code properly tells WP when there are no widgets so this default content appears. Gonna add this to the FAQ when I (finally) get round to the ‘late loading’ extra coding I promised weeks ago :-(
Nice Work. This Plugins Too Good To Be Forgotten like a cup of Coffee in the morning. I love This. By the way, Coffee has a time guys.
Thanks…
Thank for this useful plugin. Anyway how can I post a sidebar on selected multiple pages only?
Good morning, I’m Spanish, sorry if my English is not good.
I have 3 days with a problem to make something very simple.
I want a widget to display only the file index.php, but repeats the widget at: /page2/ & /page/3/ & /page/4/ & /page/5/ and so indefinitely.
Any solution?.
Thank you.
i am struggling to get a plugin that can act as a filter to filter my site for price and certain tags. I dont know how i can do that. Please can you reply
I’m afraid you are going to have to expand on that description, tony.
After the last update, I can’t upload pictures on my blog anymore. I don’t know why, it says “HTTP Error” after I wait a wile and nothing happens. If I Deactivate the plugin, it’s ok.
Knows anyone why?
P.S.: I’ve noticed this issue on two different blogs hosted in two different places.
You’ve got me there – I have absolutely no idea, sorry. And I can’t think of a way of helping you troubleshoot, short of giving me admin access to a site displaying this behaviour.
could it be that some of your logic outputs text? try removing the widget logic from widgets one by one to see if blanking one of them stops this from happening – you can always save out your current WL config for safe keeping.
May Day! May Day!
We recently learned that the IDXpress plugin by Diverse Solutions does not function properly when WL is activated. This is a really tough spot to be in because our site relies so heavily on both widgets that it simply cannot do without one or the other. The IDXpress plugin is a dynamic real estate mls/property search tool that works perfectly when the WL widget is inactivated. However, when WL is activated, the property slide show component of the plugin fails to work.
Your plugin is simply a must have for anyone that uses WordPress and I so hope that you might have some guidance for us.
Here’s an example page: http://califunddot com]/idx/mls-p820512-359_mountain_ct_brea_ca_92821
Thanks in advance for any help you might be willing to offer.
I assume that as the slideshow in that page linked works, that you have deactivated WL. I’d need to see what it and the HTML looks like when WL is active to guess at the problem
Never had a problem with widgets now there is a delay when using and when I take blank widget to use most times I have to click on widgets again to use another one because it is greyed out any help thank you
getting errors on v 0.52:
Parse error: syntax error, unexpected ‘;’ in /home/jinga/public_html/system67/wp-content/plugins/widget-logic/widget_logic.php(270) : eval()’d code on line 1
something is wrong with the code in your widget-specific “widget logic”
Thank for this useful plugin. I think I’ve got it working now :-)
I recently installed Widget Logic and love it for the customized landing page I created.
My only problem is that my sidebar disappears on my regular blog posts. Here are a few samples. Any help you can give is appreciated.
when I created a new post, my homepage sidebar does not show up. Here are the three links:
Homepage
http://www.joeyo.org
Custom Side Column (page)
http://www.joeyo.org/create-transforming-stories-of-art-life-faith/
Latest Post (Side column not showing)
http://www.joeyo.org/2012/05/a-video-interview-with-eric-nykamp/
Also, I’m not sure if this is a WordPress issue or Widget Logic, but ever since I started using WL, my two most recent posts are showing up in the #2 & #3 position and my older post remains at #1 (Eric Nykamp post).
Thanks for your input!
The new wordpress upgrades have left this plugin and my site a bit wonky. For now the plugin is disabled but this is the error header thing it’s causing: http://s45.photobucket.com/albums/f60/Talinan/?action=view¤t=ScreenShot2012-06-15at122418PM.png
Any idea what I can do to fix this?
“parse error…eval()’d” indicates you have badly formed widget logic code in one of your widgets. 2 errors suggests two different widgets have similar problems. you can work out where the problem is by blanking (and later restoring) the logic and seeing if it makes a difference
@joey #448, looks like you home is fine, so I’m going to guess you fixed it?
I have used widget logic for over three months on a development site.and i am very pleased with it. I uploaded to 0.52 and immediately Nextgen galleries could not locate either galleries or pictures.
It came the same day i upgraded word press 3.4.1and suffusion 4.2.4 so i was not sure of the underlying cause
After a bit of testing i was able to switch the error in Nextgen on and off simply by loading unloading Widget Logic.?
Any thoughts
i am trying to think what difference deactivating and reactivating WL would make? I’m afraid I don’t know enough about nextgen galleries to know at what level WL could be interfering.
One new thing to try is the ‘Load logic’ setting which sets the point that WL starts to be checked – if you set it from the default ‘early as possible’ to a later point, see what difference that makes. Of course, you are all set now (for whatever odd reason!), but for next time. Glad you are ok tho.
Hi there!
First of all, nice job i found Widget Logic very useful.
Thank you!
Second, i am using it on website based on wordpress 2.9.2 that i am not going to update to an newer version.
I never had any kind of problem before, but today casually i found an error message under admin panel / widget section.
I wasn’t able to expand any of the sidebars in this section there in the admin section. The website works well anyway.
Fatal error: Call to undefined function submit_button() in …/wp-content/plugins/widget-logic/widget_logic.php on line 194
And this is the line:
\< ?php submit_button( __( 'Save WL options' ), 'button-primary', 'widget_logic-options-submit', false ); ?\>
Now i need to make some changes to this website especially on widgets so i’m gonna asking you: what might have happened? And how can i fix that?
Thank you
Piero
Ah thanks for that. Turns out submit_button is WP 3.1 and later, and I never noticed. I might revert that to make it 2.8 compatible. someone else said it wasn’t worked pre 3.0, and i was most put out, but they gave me no more clues. I will have a tinker.
you can fix it in the short term by reverting to an older version
http://wordpress.org/extend/plugins/widget-logic/developers/
error in 0.53
see: http://wordpress.org/support/topic/plugin-widget-logic-problem-after-upgrading-to-053?replies=7#post-2983754
Hi your plugin widget login has a upgrade to day I did it and now it does not activate and i received this message
Fatal error: Can’t use function return value in write context in /home/offshore/public_html/wp-content/plugins/widget-logic/widget_logic.php on line 264
You know what happen?
Rene
Apologies to the many people who updated to the accidentally prematurely released 0.53 I’ve been trialling. I rolled back the WP repository ‘stable version’ to 0.52 as soon as the problem was brought to my attention.
i’m afraid you will have to manually remove WL to make your site function again and then reinstall the properly stable 0.52
0.53 will be out soon to fix what are relatively minor bugs, so it’s rubbish that i’ve caused so much badness in the process :-(
please help on this issue, i have used widget logic for years, suddenly on my artisteer created theme, i enter my conditional tag into the widget “twitter widget” and the widget “diy tarot” and on pressing save the conditional tag disappears. it is working fine on the other text widgets. i have also deactivated all other plugins, same issue, i have further placed the conditional statement recomended by you at the end of the loop. no solution. funnily, on other blogs also using artisteer theme the twitter widget accepts the conditional tag. i have also updated deactivated and reactivated the problem plugins. thanks in advance. tamsin
“the conditional statement recomended by you at the end of the loop”
sorry, Misty, what is that you are referring to there. I’ve no clue why some widgets should lose their WL on saving – i’ve even looked at http://wordpress.org/extend/plugins/diy-tarot/ and it seems harmless enough. sorry
Alan,
Before I had just deactivated the plugin. It’s active now and still has the error in the header, twice.
http://www.harvestofdailylife.com/seriously-an-electric-toothbrush-turned-this-mouth-snob-around-ad/
Funny thing is it’s always worked fine before… then in June after some WP upgrades it got wonky.
Gah, can’t edit the previous comment anymore but the PHP in one of my widget had improper spaces and junk. Fixed it and the problem is resolved :) Yippie.
Just FYI, if you accidentally enter a line break into a widget’s “widget logic” field, it breaks the plugin and puts a lot of error codes all over your site. When the plugins page is refreshed, the line break disappears from the widget logic field, making it really difficult to determine the cause of the error (trust me). If you save the widget again, without the line break in the widget logic field, the error is gone.
Thanks steve – i will check and add that to my to do list. I have been very poor at updates for ages now – ust try harder
Hi,
The plugin is great. I need some help, the sidebar is not picking a the standard width. How do I change the width size?
Here the link http://dev.myhavens.com/latest-technology-news-and-update/
Please help!
Widget Logic is one of the must have plugins when it comes to WordPress. I use it pretty much for every site I create. However, there have been some compatibility issues in the recent WP 3.5, I hope Alan will have some time to do needed modifications.
Installed Widget Logic just now, and it saved my day! Thank you so much for the brilliant piece of work! This is definitely one of the “must-have” wordpress plugins. Thank you again! :)
Plug-in is very important for word-press. I want to add this plug-in my word-press anybody help me. How possible this work.
Hey! Would you mind if I share your blog with my zynga group?
There’s a lot of folks that I think would really enjoy your content. Please let me know. Thanks