Adding new bbcodes, such as a "Did you know?" box
-
I’m writing some documentation, and it would be great to have little snippets related to what I’m writing in a little “Did you know: …” box that was inline with my text.
I can write this up with some HTML/CSS and easily insert it with javascript, but I’m wondering if there is an easy way to add a new bbcode tag to do this for me.
So if someone could point me in the right direction, I’m looking to do something like:
[Didyouknow]To do this something special, you do these things and then stuff happens[/Didyouknow]
And then have that text pop up in my pre-written html/css block which floats to the right or left, or even center. Bonus points if I can add [Didyouknow float=”right”].
I’m comfortable with PHP, just not WordPress and it’s api.
EDIT: Not looking for a plugin to do this, although I assume what my goal is, is to make a plugin… But the only “Did you know” plugin appeared in the sidebar – that’s not what I want. I want to add this to a specific page and have it inline with my documentation.
- The topic ‘Adding new bbcodes, such as a "Did you know?" box’ is closed to new replies.