Sillybean

Creating roles

Sometimes, rather than adding capabilities to an existing role, you need to create a whole new role. The code to do so is relatively easy. Again, place these lines in your theme’s functions.php file: (more…)

snowmg!

How rare is snow here? I’d never seen this glyph on the weather widget, let’s put it that way.

preserving HTML

Several of the description fields in WordPress will strip any HTML entered into them. You can preserve them with a little work, though.

User Descriptions

The biography field on the user profile page accepts a limited number of HTML tags — the same ones allowed in comments. If you need to create richer biographies for your users, you can preserve HTML by adding the following to your functions.php file: (more…)

moving the furniture

If you follow me on RSS or LiveJournal, you probably just saw a flood of new posts. Sorry about that! When I started wordpress-as-cms.com last summer, I meant it to be a place where I could write about all my geeky technical WordPress stuff without boring you all here. But, since I’ve written so many plugins, and because my WordPress book is coming out soon, it made less and less sense to separate the two.

So, I just imported a bunch of stuff, and I’m now cleaning it up (the code from those posts really doesn’t play nicely with Textile, which might force me to abandon it at last, as much as I love it), and in a little while I’ll shut down the other site and redirect everything here.

Sorry about the mess.

using shortcodes everywhere

At the moment, shortcodes in WordPress are processed only in post/page content. You can use them in lots of other places, though, if you enable them for each field you want. Here’s how to use shortcodes in widgets, excerpts, comments, theme files, user descriptions, and category/tag/taxonomy descriptions. (more…)