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,723 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. mllehman on 19 June 2009 #

    Thanks for your prompt reply:

    This is where I am now… I posted on the wp forum here:
    http://wordpress.org/support/topic/278187/page/2?replies=47#post-1110440

    Thanks again!

  2. Troy Corley on 3 July 2009 #

    I’ve been using Widget Logic on my 2.7 WordPress site for a while. But then I upgraded the plugin yesterday and was unable to use WP text widgets. I can’t edit or create new text widgets unless I deactivate Widget Logic first. Any fixes? Thanks!

  3. admin on 4 July 2009 #

    the good (ish) news is that you are not alone — see the WP forums for one other guy having this issue and helping me with some feedback.

    the bad news is that i cannot reproduce this problem with my WP2.7 (actually 2.7.1) install, so I don’t know what to do to fix it. yet.

  4. Scott on 7 July 2009 #

    Can you make the entry box for widget logic bigger or scalable? If I have a long command I can’t see it unless I copy the whole command and paste it into note pad.

    Thanks!

  5. admin on 7 July 2009 #

    i have thought about this – and how to do it as simply as possible. if i make it a textarea rather than a text input that would make it expandable in safari — would that work on other browsers too?

  6. Anthony on 7 July 2009 #

    I would love to use this plugin but is it WP 2.8 compatible yet?

  7. vivi on 8 July 2009 #

    Really do appreciate the hard work thats gone in here the logic is awesome and fluid.

    But WP is supposed to simplify life , bring more people into the blog sphere (needless to say most of these people don’t even know what php means, translated it means these people are newbies)and most of them will not even know where to begin with this tool .

    WP is supposed to be simple but unfortunately this tool does exactly the opposite. More tools like this and the WP market share for the newbies will shrink to a trickle.

    May be you should start seriously thinking about developing your tools for CMS – now no one claimed CMS was simple ??

    Cheers
    vivi

    PS: I hope that you will take my feed back in the right spirit?
    PSS: Its a disaster with 2.8

  8. admin on 8 July 2009 #

    I have done some 2.8 testing and it seems fine. Let me know some specific problems and I’ll get on it

  9. Dainis W. Michel on 23 July 2009 #

    Hiya,

    with the first portion of this:

    !is_user_logged_in() || !is_page(array(1258,1669,1670,1394))

    I’m trying to say: “show only when the user is not logged in,” which works all by itself.

    Now, what I’m trying to do is say

    1) Show only when the user is not logged in as a general rule
    2) Don’t ever show on these pages (regardless of if the user is logged in or not). I can also say “don’t show if the user is not logged in and is at the following pages.”

    The thing is if I say

    !is_user_logged_in() && !is_page(array(1258,1669,1670,1394))

    then I think I get:

    “Show if user is not logged in and don’t show if user is is simultaneously at one of these four pages.”

    Hmmm…just tested it, and it works with the and, not the or.

    It’s interesting, because WL starts with

    “Show if…”

    when I put a not in front of is_user_logged in, I get: show if user is not logged in. That works.

    The thing is

    When I say

    “Show if… !is_page” it’s like it should be “show if it is not this page,” but that’s not correct. When I say !is_page I have to start the sentence with “don’t show,” which somehow doesn’t make sense to me yet.

    Well, it’s working, and I wonder you tell WL “show on this category,” does that also mean “don’t show on any other category?” I guess so.

    So things can be either positively of negatively formulated. Interesting.

    Thanks, this has been fun!

  10. admin on 23 July 2009 #

    glad it’s worked out! what you have to get your head around is what the logical OR || operator and logical AND && operators are doing.

    in your first case

    !is_user_logged_in() || !is_page(X)

    this is saying ‘show the widget when the user is not logged in OR when the page is not X’ – which means it will be showing if the page is not X regardless of whether logged in or not. which is not what you were after. and if you are not logged in it shows regardless of which page it is.

    logical OR is a way of combining when you want to consider either of two separate instances to be true.

    so you needed to reword what you wanted as

    “Show if user is not logged in AND EVEN THEN, only if user is not at one of these pages”

    which is a way of narrowing the conditions – a logical AND operation.

    :-)

  11. JW on 24 July 2009 #

    I am using Widget Logic 0.46, WordPress 2.82, and Thesis 1.51 with a static “Home” page and all posts on the “Blog”page.

    I can not get Widget Logic to only show the main widgets (which include Recent Posts, Recent Comments, Archives)on the “Blog” page only.

    When I enter “is_page(blog) into andy of these, they disappear from the “Blog” page.

    Is this a bug or is there a way around this.

    Thank you,
    JW

  12. JW on 25 July 2009 #

    I receied the fix on the widget logic wordpress forum from “greenshady” and the simple fix he gave was to use:
    is_home()

    JW

  13. Jim R on 26 July 2009 #

    EDIT: Disregard what I wrote. It was “user error”. :)

    Nice plugin!!!

  14. Jim R on 26 July 2009 #

    Ok…now I am having trouble. My Twitter widget isn’t showing up since utilizing this plugin. I don’t have anything in the Widget Logic setting for the Twitter widget. Are there any known conflicts?

  15. links of london on 28 July 2009 #

    Thanks for your information!

  16. Lily on 6 August 2009 #

    awesome stuff mate, made my day

  17. Vince Theron on 7 August 2009 #

    This is a great widget, but I have a question. I’m making a site with many pages, and can’t figure out how to write the code so that a page and all its sub-pages get the same widget, instead of having to make a separate widget code each page (I have 60 + pages!) using this: is_page(‘page name here’)

  18. Bob on 7 August 2009 #

    Great plug-in, very useful. Thanks you for creating it.
    However I found a bug. With WP 2.8.2, when widget logic is activated, new widget (without the details in widge logic box) cannot be saved.

    The workaround is to disable widget logic, add the widget and reactivate the plug in.

  19. admin on 9 August 2009 #

    vince, the notes in http://wordpress.org/extend/plugins/widget-logic/other_notes/ has an example that fits what you want

    bob, you are not the first person to say this (see also the WP forums), but i have never managed to replicate this issue on any version of 2.8 and WL. FT works on 2.8.3 (v recent upgrade from 2.8.2) and we don’t have that issue. there is some other factor interacting with WL that i can’t debug or take any steps to circumvent.

    if you’d like to give me access to your blog (including access to edit the WL plugin on your site), i’d be delighted to give it a go.

  20. Dainis W. Michel on 10 August 2009 #

    This is such cool stuff! Wow! I wonder If I can apply !is_user_logged_in() to a category.

  21. admin on 10 August 2009 #

    is_category(x) && !is_user_logged_in()

    will only show a widget on the category x archive page when the user isn’t logged in

  22. Dainis W. Michel on 10 August 2009 #

    Ha, that was quick, actually, I meant whether I can show or not show certain posts or pages as a result of this kind of code in special fields or something like that. Basically, I want a particular category only to display if users are not logged in (that is they are visitors). It’s not widgets, it’s a category full of posts. :-) I think I figured out a fun workaround, though…

    Thanks a ton!

  23. Ben Herson on 15 August 2009 #

    Hi,

    I’m having some trouble getting more than one widget to display using Widget Logic.

    Works fine with one widget but any more than one and the second wont show.

    I’m using Massive Themes running wordpress 8.4 on a server running php 5.5.4

    Any help would be GREAT!!

  24. admin on 15 August 2009 #

    switch to the WP default theme and try as simple a setup as you can. say 2 widgets, one set to is_home() and the other to is_single(), or something as uncomplicated as that. let me know how that goes

    i can’t find Massive Themes – do you mean MassivePress?

  25. Ben Herson on 15 August 2009 #

    I’ll give that a shot! Sorry I meant Massive News from Press 75.

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)