What to do about shortcodes?

I recently read a wonderful post by Justin Tadlock where he outlined the various problems associated with going overboard with shortcodes. The biggest problem he identified was that by using a theme’s shortcodes, you are essentially locked into using one of their themes forever as once you switch themes the special formatting is gone and you are left with stray shortcodes in your posts. While you could just edit each post and remove all the stray shortcodes there has to be a better way. WordPress is loved for it ease of use and special features shouldn’t be added in a way that tarnish that reputation.

Lately I have been trying to think more long term about WordPress themes. While every theme developer wants to believe that they are going to have a customer for life it is important to think how your development decisions will affect your users in the future, especially if they switch to another theme.

Then I ran across a post by Alison Barrett who offered an alternative to shortcodes. Her idea was instead of using shortcodes in her Bolts parent theme she would add new styles to the TinyMCE styles dropdown in the visual editor. By utilizing this method while you will still lose the formatting when you switch themes the correct html will be in place and there will not be any stray shortcodes in your posts, the code will degrade gracefully.

Also in order to provide easy transferal of the css for the html code generated by the styles dropdown I would make sure to have a separate stylesheet (which Alison did) or at least a clearly marked portion of your regular stylesheet that has all the custom styles. Then when the user switches themes all they have to do is transfer over that css and all their previous formatting will be preserved.

Does this method make sense? Any other pros/cons?

Blogging when no one is reading

It has always been hard for me to sit down a write a blog post when I know that basically no one is reading. Today I decided who cares. First, I believe that blogging is something that only gets better the more you do it. Second, reading things I written in the past it is kinda like a time machine. I get to see what I was concerned with/working on at a particular point in time. I find as I am getting older I am thinking more about the past and how I arrived at where I am today so I think it is increasingly important to preserve some record of the past (for myself anyway). 

Timthumb with WP Multisite

For a while now it has been bothering me that I could not get the timthumb script to work with my WP multisite test site. I would always just end up placing the files in the regular upload directory as I could not get the images in the blogs.dir to show up via timthumb. 

As I finally had a bit of free time, I looked around and found a solution. Basically since the images are stored on the regular domain and my site is technically a subdomain, timthumb thinks that my images are actually stored on an external site and by default timthumb does not allow linking to external sites. The solution is actually quite simple, all you have to do is edit the timthumb settings to allow external sites by changing the “allow external” setting to true and then add your domain to the list of allowed sites.