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 … [Read more...] about preserving HTML
WordPress
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 … [Read more...] about moving the furniture
using shortcodes everywhere
Read this in Spanish | Leer esta en Español Read this in Turkish | Türkçe bunu okuyun 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 … [Read more...] about using shortcodes everywhere
Take control of your excerpts
Here are three short functions you can add to your theme's functions.php file to change the way excerpts work on your site. When you use the_excerpt() in a theme file, WordPress will first use the contents of the Excerpt field from your Post→Edit screen. If it's empty, … [Read more...] about Take control of your excerpts
Changing roles’ capabilities
If you need to change one or two capabilities, it's relatively easy to do so with a few lines of code in a plugin or your theme functions file. For example, if we wanted to allow any logged-in user to view our private posts and pages, we would need to grant them two additional … [Read more...] about Changing roles’ capabilities
Creating a user directory, part 2: Building the page template
In the first installment, we added some contact fields for our users. Now we're going to build the page template that displays the user directory. … [Read more...] about Creating a user directory, part 2: Building the page template
Easier internal links for WordPress
Last week I got into a conversation with my friend Fletcher about linking to internal pages in WordPress. To wit, it could be a lot easier. Wiki-style links would be better than nothing, but personally I hate having to remember special codes for things. Still, WordPress's … [Read more...] about Easier internal links for WordPress
Creating a user directory, part 1: changing user contact fields
This is the beginning of a three-part series on building a user directory. Part 1: Changing the contact fields on the user profile pages Part 2: Building the user directory page template Part 3: Building author templates and linking them in the directory First, we'll add some … [Read more...] about Creating a user directory, part 1: changing user contact fields
Add sortable, striped table script — only when needed
Ever wondered how I dressed up the tables on this site? I'll show you! We'll use the code for adding stylesheets and scripts conditionally to include Yoast's improved sortable.js only when a post or page contains a table. … [Read more...] about Add sortable, striped table script — only when needed
Create private categories
Have you ever tried to create a category consisting entirely of private posts? It's a pain to have to remember to set the visibility for each post before publishing it. One of my users simply couldn't remember to do it, resulting in a lot of accidentally public posts on that … [Read more...] about Create private categories