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

wow, look at all of them. FT salutes you


in • 124,711 views

Comments All, 1–25, 26–50, 51–75, 76–100, 101–125, 126–150, 151–175, 176–200, 201–225, 226–250, 251–275, 276–300, 301–325, 326–350, 351–375, 376–400, 401–425, 426–469.

  1. Rotheblog on 13 June 2010 #

    PS, I am glad I kept this window open. Do you have subscribe to comments on this site? I wouldn’t have known you replied.

  2. admin on 14 June 2010 #

    doesn’t sound like an issue with Widget Logic (if that’s the one you are talking about), it sounds like a much larger issue. but i will take a look.

    our hosting company limit the plugins we can use, so we’ve not got any ‘subscribe to comments’ functionality. i’m not even sure they would let us send e-mail from the server.

  3. admin on 16 June 2010 #

    I have again briefly checked WL on WP3 and if there is a problem it’s not obvious to me yet.

  4. Ross on 21 June 2010 #

    Thank you, this is by far the best widget I’ve found! There is no way I would have been able to get the look I wanted without it, plus it works perfectly…

  5. jnforyou on 1 July 2010 #

    Alan,
    I’m back with another question about widget logic with ttftitles. This time alternating styles. Currently in the functions file my two widgets look like this:
    if ( function_exists(‘register_sidebar’) )
    register_sidebar(array(
    ‘name’ => ‘standard’,
    ‘before_widget’ => ”,
    ‘after_widget’ => ”,
    ‘before_title’ => ”,
    ‘after_title’ => ”,
    ));

    if ( function_exists(‘register_sidebar’) )
    register_sidebar(array(
    ‘name’ => ‘footer’,
    ‘before_widget’ => ”,
    ‘after_widget’ => ”,
    ‘before_title’ => ”,
    ‘after_title’ => ”,
    ));

    Now, I’ve tried to add the “widget_style_a/widget_style_b” code supplied on the widget logic plugin homepage to replace the original filter code for ttftitles, but I’m not sure the exact values that need to be addressed changed in regards to how my css works. Any help is much appreciated Alan. Thanks

  6. jnforyou on 1 July 2010 #

    whoops, i actually have a div container stated after “before widget”=>
    (div id=”%1$s” class=”widgetfooter %2$s)
    and it closes right after “after_widget”=>

  7. Linda Nieves on 3 July 2010 #

    Thank you for the time you spent on this post. Know that your work is much appreciated. Keep it up!

  8. Online web hosting on 6 July 2010 #

    This is really interesting. This is one of the reasons that I love surfing. You’ll never know what you’ll find.

  9. Valeri-Teodor Ivanov on 13 July 2010 #

    Hello,
    firstly, I would like to say how much I LOVE THIS PLUGIN. Good job Alan!
    Secondly, I have an issue:

    I want to show a particular widget ONLY on ONE child page. Can anyone please tell me how?

  10. Alan on 13 July 2010 #

    just one specific page, or one child page per parent page? You should be able to get what you need between

    http://wordpress.org/extend/plugins/widget-logic/other_notes/

    and

    http://codex.wordpress.org/Conditional_Tags#A_PAGE_Page

  11. Filippo on 15 July 2010 #

    Hi,
    I’m using widget Logic (0.47, with WP 2.9.2) and I’m trying to use more than one condition but it doesn’t work.
    I tried to write something like this
    is_category(‘cat_name’) && has_tag(‘tag_name’)
    and something like this
    is_category(‘cat_name’) && is_tag(‘tag_name’)
    but neither of them work.
    Any idea?
    Thank you in advance
    Filippo

  12. Alan on 15 July 2010 #

    if you want the widget to appear when either one OR other of two conditions is true, then that needs an OR. if you use AND it will only appear when both condition one AND condition two are true.

    AND = &&
    OR = ||

    hth

  13. Filippo on 16 July 2010 #

    Thank you. I treid again but the tag sentence doesn’t work. If I try to write only the category sentence it works, if I try only the tag one it doesn’t work…
    obviously if I try both they don’t work.
    Any idea? Maybe a spell mistake?
    Thank you again

  14. Alan not logged in on 16 July 2010 #

    careful of the difference between is_tag (this is the tag page X) and has_tag (this post has the tag X)

    http://codex.wordpress.org/Conditional_Tags#A_Tag_Page

    other than that, and looking at the codex page, I don’t think I have any more advice, sorry.

  15. Filippo on 16 July 2010 #

    I understand the difference between is_ and has_ but what I mean is that simply this sentence doesn’t work, and I don’t know why… Don’t you know about conflicts with other plugins?

  16. admin on 16 July 2010 #

    There are conflicts with some plugins but they are with widgets and widget-altering functionality, not with conditional tags. Take a look at the FAQ (link above) for some troubleshooting ideas.

  17. Tom on 20 July 2010 #

    For some reason when I enter some widget logic code, the widget is removed from all pages rather than the single page. I’ve tried is_page(#) and is_single(#) and in each case the widget dissapears completely from the site on every page. Also, I can’t seem to get is_page(array(#,#,#)) to work. Any help would be great.

  18. Alan on 21 July 2010 #

    have you checked what happens in a default theme (many themes have code that interferes with some conditional tags working as expected)?

    A useful way to troubleshoot generic problems like this is to use a PHP widget (set with no Widget Logic so it always appears) and get it to print_r the conditional tag, so eg print_r(is_page(6)) or whatever it is you are putting in instead of #

  19. ratreides on 25 July 2010 #

    Hi Alan,

    Been a long time happy user of Widget Logic and congratulations on your plugin!

    I have a question.

    I am developing a WordPress site that is mainly based around Pages not posts.

    I have a need to have different content in various widgets within sidebars for about 100 Pages.

    Would the use of the ‘widget content filter’ option allow me to ‘pull’ different content for each widget depending on the Page ID?

    Whilst I am not a coder if I knew it was possible I could hire a coder to do it for me.

    Please advise.

    Regards,

    Ray

  20. Alan not logged in on 27 July 2010 #

    You could, but that would be a very roundabout way of doing it. Sounds more like you need a widget building – the key to which will be knowing how to link the page ID with the content you want to appear

  21. Freewomyn on 27 July 2010 #

    This might be a stupid question, but I am confused, even after reading the FAQ and other documentation available over at the the WP plugin site.

    Where exactly do I put the code? I’ve tried putting it in the Widget logic box in the widget itself, but this doesn’t seem to do it.

    I’m running WP 3.0 and Thesis 1.7. Don’t know if that makes a difference.

  22. Phil on 28 July 2010 #

    This pluggin work on WordPress 3.0 ? Doesn’t appear to…

  23. admin on 30 July 2010 #

    I’ve just updated this site (FT) to WP3 and widget logic is working fine with WP3. I’m looking for anyone having problems with WL and WP3 that’s willing to try some troubleshooting. A small minority of people seem to have problems with WL and WP3, and I’d love to know what combination of configurations they have that are causing the issue.

  24. Jon on 31 July 2010 #

    I’m trying to use Widget Logic to keep a widget from appearing on a specific page, as well as from appearing on any page from a specific category (the page number is 6243 and the category number is 31). This is what I placed in the “Widget logic” field of the widget in question:

    !is_page(6243) || !in_category(31)

    Using that string, the widget still appears on page #6243 and all entries from category #31.

    If I place in the “Widget logic” field only “!is_page(6243)”, the widget no longer appears on that page … but once I add “|| !in_category(31)” to the string, it breaks.

    Also, if I enter only “!in_category(31)” into the “Widget logic” field, the widget no longer appears on all pages within category #31 … but once I add “|| !is_page(6243)” to the string, it breaks.

    Any ideas?

    (I’m using WP 3.0.1)

  25. Alan not logged in on 31 July 2010 #

    You want

    !(is_page(6243) || in_category(31))

Back up to post. More comments: All, 1–25, 26–50, 51–75, 76–100, 101–125, 126–150, 151–175, 176–200, 201–225, 226–250, 251–275, 276–300, 301–325, 326–350, 351–375, 376–400, 401–425, 426–469.

Add your comment

(Register first to guarantee your comments don't get marked as spam)