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

sorry Trina – if the corrected head.php doesn’t fix it, and it is the theme to blame (did you say the problem goes away in the default theme?) then i really don’t know where to go next. i might try a test install of that theme and try it myself. not today though.
marilu – http://codex.wordpress.org/Conditional_Tags is an essential guide to the syntax of most logic you need. and you will find what you want under the bit on PAGEs.
I’ll try and look up more information but where in the process does it look to see if there is a variable set in widget_logic? Is it in sidebar.php? Or a file before that? That way I can see if the function is ever called.
I tried to use is_user_logged_in(‘false’) to show a newsletter subscription widget only if users are not logged in. That means “show this widget if user is a guest (not logged in).
both
is_user_logged_in(‘false’)
is_user_logged_in(‘true’)
display the widget only if the user is logged in, and I want it to be if the user is not logged in.
I was thinking about validate_username(‘false’) …
Since this is one of my few attempts to use any kind of functions, I could likely be doing something boneheaded!
PS: Definitely a cool and useful plugin!
it’s just is_user_logged_in() and doesn’t take any values
as usual in PHP to get the reverse you put ! at the beginning to add a logical NOT to the code:
!is_user_logged_in()
Awesome admin! How cool! Sending you a big smile from Vienna. Now I’m off to figure out how I can add a “widget” to the top part of my home page, in the “content” area and not the side bar.
Can I send you a buck or two via PayPal?
Best,
Dainis
I confirmed !is_user_logged_in()
Thank you for this topic
Love the plugin, but it seems it has a little bug, see more here: http://themehybrid.com/support/topic/hybrid-051-bug-report#post-19441
well i can’t view all that post as i’m not signed up for that site. if someone posts a description of the issue on the wordpress widget-logic tag forum i’ll see what i can do.
Now I’ve done that.
Sorry I forgot that you have to be logged in to see what Justin writes.
Basically it’s just when I use widget logic to display a widget on only 1 category page, then the rest of the pages shouldn’t display anything (and they don’t), but the page should also be in full width, and this isn’t the case.
According to Justin: “It’s because the plugin doesn’t “deactivate” the widgets while on that page. They’re still being read as active by WordPress.”
I have wanted to set up some Podcasts – so great information, thank you.
Works fine on my site with WP 2.71 French version. I use it to have the Video-Widget sidebar widget display a random video in the sidebar only when on the front of the site, using the conditional tag is_front_page().
Merci beaucoup!
Seems to work OK with 2.7.1, but gives an error when activating, and when saving the logic for a widget. It does install, and does save the logic though, so if you only intend to use it once when setting up your widgets, it does the job nicely.
any more info on those errors, i’ll investigate – tho it would be great if you could see if it was theme specific or if it’s still there when all your other plugins are off
Vielen Dank für diese guten Informationen,
mein Englicsch ist zwar nicht so gut, aber es hat gelangt
Mike
Hi,
I have added this widget to my site, (great widget) However I require my visitors to log into the website via google friend connect. The widget then seems to not realise that they are logged in even though wordpress does. I have tried it with just the single page function and it works great so I knwo the plugin works , plus when I log in as administrator it works fine but when I test it as a google friend it still appears using !is_user_logged_in()
be great if someone could shed some light :)
i don’t know a great deal about google friend connect, but a quick look around the net makes me think that if you have logged into it, that this is entirely separate to the wordpress login mechanism. so is_user_logged_in() isn’t going to be at all relevant to being logged in via GFC.
but sadly, i don’t know what mechanism you COULD use to identify people logged in via GFC. it looks entirely javascript driven and ‘client side’ – so the server won’t be able to tell.
sorry – if anyone can shed light on this, i’d be grateful.
Widget Logic is broken – or at least a ton of us are having issues with it. With 2.7.1 2.7 and on 2.8. Please help us out here. They keep dissapearing after adding the widget logic.
http://wordpress.org/support/topic/278187?replies=3#post-1098929
there is a problem with WL and 2.8, which I think i’ve already solved. will be updating the WP repository soon.
UPDATE: the Development version here will shortly be my first attempt at a 2.8 version (with some extra fixes thrown in).
I don’t think there are any general problems with WL and WP2.7 – though there are theme-code-related issues and one specific GUI issue. hoping to address some of these in the 2.8 version coming soon…
I have been trying to use Widget Logic to use the TTF Titles plug in for my Widget titles. The function code for the ttftitles returns tons of errors. The most common one is an “unexpected $end error” I don’t know if I am not doing it right or what. I copied and pasted this code:
function ttftext_widget_title($content=”, $widget_id=”)
{ preg_match(“/]*>([^<]+)/”,$content, $matches);
$heading=$matches[1];
$insert_img=the_ttftext( $heading, false );
$content=preg_replace(“/(]*>)[^<]+/”,”$1$insert_img”,$content,1);
return $content;
}
I am no PHP expert so is there any way you can give details on what to do with it and what changes to what and what closes it, etc? Thank you!
as you’ve taken this to the wordpress forums, i’ve answered there too.
Awesome, thank you so much. :)
Hiya, what a wonderful tool this is! Thanks a bunch. Now I’m trying to do the following:
Don’t show if user is not logged in and don’t show if user is not logged in and at this particular page
These are the pieces:
!is_user_logged_in()
!is_page(‘recently-acquired-tinnitus-survival-ecourse’)
But I don’t know how to make the logic work:
So !is_user_logged_in() OR
!is_user_logged_in() && !is_page(‘recently-acquired-tinnitus-survival-ecourse’)
But what kind of parens do I need?
Best and thanks a ton! :-)
i updated the notes and faq on the WP site http://wordpress.org/extend/plugins/widget-logic/other_notes/ which might be of some help
i’m a bit confused by the logic you want – it seems like the first case !is_user_logged_in() would be true before you get to OR with the second case which is ‘!is_user_logged_in() AND something’ ie a subset of the first case.
perhaps you’ve got tripped up over too many “don’ts’ and “nots”. try restating what you want in terms of when you DO want the widget to appear.
My widgets are also disappearing when I save, and I’m not quite sure what to do. I am using wordpress 2.7.1 and Widget Logic 0.46.
What should I do to fix this problem?
(I have also left a more detailed question in the forums here: http://wordpress.org/support/topic/278187/page/2?replies=44#post-1110113
Thanks in advance for your help!
replied on the wp forum