The official Simple Asides page can be found here. Please do not use this page anymore.
The newer versions of Wordpress (from 1.2 on) have cool plugin functionality. I used to have asides on my blog, but since I upgraded, I didn’t want to hack through a lot of code just to create the “asides” effect. Although there are some plugins already written for WP that create asides functionality, they require the use of special fields which I dislike. I would rather just write a post, place the post in a designated category (like Asides) and have it be formatted as an aside!
Therefore, I worked on my first WP plugin today: Simple Asides which does roughly what Matt describes in his blog in the plugin format. Usage is very simple:
- Place the simpleasides.php file in wp-content/plugins/
- Activate the plugin through the control panel
- Create a category called ‘Asides’
- Place all posts intended to be an aside into the ‘Asides’ category
Since WP had limited filters, I had to use a HTML comment trick to mask a lot of the unneeded HTML. Although writing the plugin was fairly easy, the WP Codex could benefit from some more plugin API documentation. Overall, I liked the WP plugin system and hope to work with it more.
Download Simple Asides: [zip] (3KB)
(WARNING: There are bugs with this plugin and conflicting issues with other plugins. Please do not use this plugin seriously. Feel free to take the code and modify it for your own uses (and even re-release it as your own plugin).)
4 Comments
Thanks for this lovely plugin. The only trouble I’m having is a conflict with headline images (which no longer work with your plugin activated):
http://www.coldforged.org/image-headlines-plugin-for-wordpress-15/
Any chance of a cure?-) - Secondly, is there a way of changing the layout of the asides via CSS?
Hi Matthias,
Thanks for the comment! However, I wouldn’t really advise you to use the simple asides plugin seriously. I have this warning at the top of my post that says: “Don’t use this yet! It’s buggy!” It turns out that since this was my first time writing a plugin, I still need to wp_texturize() a lot of text in content, etc.
Uh, well, I’m extremely busy these days so I’m not sure when I’ll write a cure to resolve conflicts. I’ll see if I can though…sometime. There is a way of changing the layout via CSS. Just edit the simpleasides.php file and change the css that is in the file. However, there seems to be limitations with the positioning and margins.
Nice blog! Thanks for visiting.
Mike,
I haven’t actually tried it, but upon looking at your code it looks like your echoing the title for non-asides categories. If you instead simplpy returned the title string I believe it will behave better with my plugin as well as others that may be having troubles.
Worth a shot at least.
Wow! I got a visit from ColdForged! Thanks for the comment. I think you might have solved the problem! I didn’t have much API documentation so I think I may have just echoed the title instead of returning it like it should have.