WordPress BBCode Plugin v0.0.2

After using basically every BBCode plugin available for WordPress–and finding every last one of them lacking–I decided to write my own. This one does not use shortcodes, as shortcodes apparently freak out when you want multi-line enclosed tags. My plugin applies filters to six hooks:

  • the_content
  • comment_text
  • the_excerpt
  • the_content_rss (strips BBCode)
  • comment_text_rss (strips BBCode)
  • the_excerpt_rss (strips BBCode)

The following tags are supported:

[b] -- Bold

[i] -- Italics

[u] -- Underline

[s] -- Strikeout

[url{=http://...}]{URL-or-link-title}[/url] -- Links

[quote] -- Blockquote

[size=n] -- Font size

[color=#nnnnnn] -- Font color

[img] -- Image

[code] -- Code

If there are other tags you’d like to see, by all means, request them in the comments.

This plugin is released under the GPL.

To download this plugin, please proceed to the WordPress plugin page.

15 thoughts on “WordPress BBCode Plugin v0.0.2”

  1. Hi! First off i’d like to say Thank You! This plugin works awesome on most of my site, but I can’t get it to work on one of my pages that uses post_content…

    It looks like this
    apply_filters(‘the_content’, $post->post_content);
    //Print post content
    $str = $post->post_content;

    Is there a way to tell the plugin to filter this too?

  2. Hello, I’ve been using this plugin. Thanks for the Great job.
    It would be great if you could add [CENTER][/CENTER] and [spoiler][/spoiler]


  3. Your plugin was instrumental in helping me setup a site with WP and bbPress integration.

    The only element of my site that isn’t smooth and professional at the moment is Recent Comments, so maybe you could help me.

    I’m using the Get Recent Comments plugin at the moment to display recent comments, and bbCode in that turns up as [stuff] instead of actual formatting.

    Would there be any workaround for this? I don’t mind editing code and such.

  4. I tested it and yes it works gorzek. It seems like a tiny plugin but what it does is huge. Many many thanks in advance 🙂 There would some Tags that I use on my board that I’d like to use on my blog too:

    [center] (To center content via tag)
    [spoiler=X] (Hide content via spoiler tag, X there is a custome name which the spoiler tag is taking)

    I would appreciate if you could include these two also.


  5. Laztrix:

    It “should” work on 2.9.x. I haven’t tested it yet but it’s a pretty simple plugin, and I wouldn’t imagine WP changed the hooks I used in the meantime. Go ahead and give it a shot but I don’t foresee any problems.

    I suppose I should update my own installation, too…

  6. It’s funny that wordpress has not a default option on BBCODES. Is this plugin work on the latest version of WordPress (2.9.x) ? I’d love this to work since I’m also posting material on my blog which had been posted on a forum before.

  7. All that should be required is for you to install and activate the plugin. I have used this with the “Visual HTML” mode, simply putting BBCode in square brackets, and it works. Could you send me an example of a post you have that isn’t working? Send to: gorzek (at) gmail (dot) com

  8. I have the plugin installled and activated, but it does not appear to be working. When I add BBCode to a new post, it doesn’t convert. Where am I supposed to implement the code? At the top of the “add new post” there’s only “visual” and “html”.

  9. Yes, I already submitted a request. Once it is approved, I’ll get it uploaded to subversion for them. Who knows, I may end up writing other plugins, if there are things I need that no current plugins do adequately.

Leave a Reply

Your email address will not be published. Required fields are marked *

CommentLuv badge

This site uses Akismet to reduce spam. Learn how your comment data is processed.