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,725 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. 逅客北极 on 1 March 2010 #

    Why do I use does not work!

  2. Cichlid on 3 March 2010 #

    Works for me. Using it on version 2.9.0 Thank you.

  3. Alan on 3 March 2010 #

    thanks.

    i’ve just updated the code to clear up the resetting wp_reset_query option that has been haunting me/the code for a very long time

  4. Cindrol on 4 March 2010 #

    thanks for the great post

  5. dandy on 6 March 2010 #

    A suggestion is to add a drop down of pages/subpages to choose from rather than a writable text field.

    Thanks

  6. admin on 6 March 2010 #

    Cheers. I have of course thought of something along those lines – of making it flip between free text code and a GUI set of tick-boxes/menus. there are other plugins out there that already offer something like that – I personally don’t like the way they’re done and I don’t want to duplicate their functionality either (people can use them instead).

    Also whenever I think about what to offer in the GUI, I get stuck thinking “what IS the most common things ppl will want”, between offering lots of confusing options, or only offering a few basics that will suit a small %age of ppl. at one point i was even pondering a user-defined library, but that was getting even more complex ui-wise, so in the end i’ve stuck with the ‘hardcore simplicity’ i started with

  7. vbulletin 4 styles on 10 March 2010 #

    Awesome plugin, this is really appreciated, ive been searching for something like this for weeks without any luck, Thanks

  8. Dave Thackeray on 11 March 2010 #

    First off: amazing plugin! Thanks for all your work.

    I’m using Widget Logic to display ads (OIO Publisher) in my sidebar on the home page and when a certain category is chosen.

    Using

    is_single() && in_category(‘fractional’)

    to display the ad only on posts in the fractional category.

    Which it does. But the problem is about 20px of the sidebar where the ad would sit, if it displayed, is displaying on every other, non-fractional post.

    Any ideas why this might be happening?

    Thanks a million!

  9. admin on 11 March 2010 #

    hard to say for sure, but it *sounds* like a CSS issue. give us a link. (i couldn’t see it on your linked site)

  10. Dave Thackeray on 11 March 2010 #

    You’re right: it’s a bleedin CSS issue. I’ve moved it to the left sidebar and all is well.

    Thanks!

    Dave

  11. jnforyou on 12 March 2010 #

    I am not the most well versed person when it comes to php, but I was hoping for some assistance.
    I am using the widget logic plugin with ttftitles, but have had problems rendering.

    I get this error: Warning: Missing argument 1 for the_ttftext(), called in /home/skyandcurb/blog.skyandcurb.com/wp-content/plugins/widget-logic/widget_logic.php(161) : eval()’d code on line 1 and defined in /home/skyandcurb/blog.skyandcurb.com/wp-content/plugins/ttftitles/ttftitles.php on line 980

    That is when I use “the_ttftext” in the widger logic form, however when I use “the_ttftext(Feed, $echo=true, $style=”navigation”)”

    I see the style, but no widget box. The “Use ‘widget_content’ filter” is checked and I have the filter code in my functions.php file.

    Are there any suggestions due to my lack of knowledge? Thanks

  12. erick on 12 March 2010 #

    works perfectly for me, thnx guys….

  13. admin on 12 March 2010 #

    @ jnforyou

    you don’t need anything in the per-widget ‘widget logic’ field to make the ttftitles thing work. all you need is the filter option ticked and the code you’ve put in the functions.php

  14. jnforyou on 12 March 2010 #

    Alan, Thank you for the quick response! The only problem I see now is only the first widget is using the ttftitle. Again, this may be my lack of php knowledge. But after seeing this, I’m wondering if there is something in functions.php overriding this?

  15. Alan on 12 March 2010 #

    the function i supply is tied to a specific format of widget that your sidebar might not be conforming to. the matching expression used “/<h2[^>]*>([^<]+)/” basically takes the first text after a and before the next HTML tag to give to ttftitles. it may be you need to adapt that.

    For troubleshooting, you can check that the filter is working and applying to every widget by changing

    return $content;

    at the end of the function to

    return $content.”WIDGET_CONTENT FILTER WORKING”;

    or something like that, which will add that extra text to the end of each widget.

  16. jnforyou on 12 March 2010 #

    Thanks again! I believe I have it figured out. in my functions the sidebar arrays were calling on:
    ‘before_title’ => ”,
    ‘after_title’ => ”

    I deleted the heading class, because I figured it was overriding the ttftitle and it worked great. Only one widget it giving me trouble, but I am going to check its styling.

  17. admin on 12 March 2010 #

    glad it’s working out for you.

    sorry that the WP comment system mangled my expression code originally (and your before/after_title code too?)

  18. Monroe Bertotti on 17 March 2010 #

    There are some very usefull information here , thanks

  19. Doug C. on 29 March 2010 #

    This is one of my favorite plugins. It works flawlessly and I’ve never had an issue with it. It does what it’s suppose to do and does it very well.

    My only trouble is locating the right conditional tags for the chores I want it to perform. For example, I have a couple widgets I hand coded and I only want them to appear on certain posts. However, I have a lot of posts and sticking them all into a conditional tag like ‘is_page(array(42,55,77))’ would be a pain.

    Is there another conditional tag that I could use to do this task in a more simplified manner?

    Thanks again for the great plugin.

  20. admin on 29 March 2010 #

    you could use tags, post metadata or html comments in the post to control the appearance of widgets, eg:

    on posts tagged Widget X:
    is_single && has_tag(‘widget-x’)

    on posts with ‘widget-x’ in a ‘show_widget’ custom field
    global $post; return (is_single() && in_array(‘widget-x’,get_post_meta($post->ID, ‘show_widget’)));

    i haven’t tested these – i’m just throwing out a couple of ideas that might need tightening up. Hope they give you some ideas.

  21. Doug C. on 29 March 2010 #

    Thanks for the reply, but I was really hoping for something more solid, something tested and known to work.

  22. admin on 29 March 2010 #

    those will work, but i was only suggesting possible approaches. how do you want to control when the widgets appear? give me a specific way of working and i’ll try to work up a specific way to do it.

  23. Doug C. on 29 March 2010 #

    Sorry, wasn’t trying to be difficult. I just wanted to know if there existed some conditional tags that would accomplish what I am trying to do, but in a more simplified manner.

  24. admin on 29 March 2010 #

    no worries. just think of a convenient approach you’d like to try and I’ll see what it suggests

  25. Doug C. on 29 March 2010 #

    There is no approach – I just want to know if there is any conditional tags that can do what I’m trying to do, but in a simpler way.

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)