Dec 10 2007

Details Of Code Changes

Category: WordPressChrisM @ 12:47 am

As I mentioned earlier on, I have now instigated a few changes in the way this blog is coded, to enable WordPress to be upgraded to 2.3.1
As this blog has a few features that only are supposed to work within certain categories, I previously used the King Text plugin; with which you can easily stipulate exactly where the code should be run, and where it should be skipped. Unfortunately, using versions of WordPress above 2.1.3 would disable this plugin, and as no script bodges were announced that actually worked, this blog has been stuck without an upgrade for some time. Not only has this meant that some features (such as native support for tagging) have been unavailable, but also vital security patches were not applied.
Anyway, a fellow forum user (Sorensicai) over at PPP suggested using
{ echo '//widget code'; }

as a way to manually force the site to only use scripts on certain areas. Of course you can change
(is_home()) for (is_category(CaTeGoRy%)) or whatever is required.

Anyway, I took the plunge, as I had not managed to break anything whilst upgrading my other WP blog to 2.3.1, and to my surprise it worked! Having had the shackles of the old plugin removed, I upgraded this blog, and updated a few other plugins, and did a little tidying up of some other code. I also realised I could move a lot of my current widgets from a specialist PHP Exec style plugin to a normal WP Text widget, as no fancy code was involved, just some images.
Anyhow, once I figure out how to call RSS feeds only within certain categories, and whether I can stack different conditions for different code snippets within one widget, I’ll be happy 🙂

Tags: ,