WordPress Tips & Tricks

Add post/page name + page parent name to body class

WordPress Tips & Tricks

This will add a page-slug class and a page-parent-slug class to your body tag, along with all the other defaults. Put this in your functions.php file:

Also make sure your open body tag looks like this (you can probably find it in header.php):

Many thanks to Utkarsh Kuketri for the original function!

Display WordPress featured image, thumbnail, or YouTube thumb

WordPress Tips & Tricks

Huge thanks to Vladimir Prelovac, who wrote the original function. I use it a ton and have adapted it a bit to check for:

  1. Featured image; then
  2. First image attached to the post; then
  3. The first image inserted in the post; then
  4. The thumbnail of the first YouTube video inserted in the post

All I added was the… Read the rest

TwentyTen Five – The HTML5 WordPress theme

WordPress Tips & Tricks

A very good Smashing Magazine article came out the other day explaining how to convert the WordPress TwentyTen theme to HTML5. Here’s that theme for download:

http://www.twentytenfive.com/

Daily Tip: Add More Automatic Image Sizes to the WordPress Media Library

WordPress Tips & Tricks

Great tip from the WPMU blog, and one I’d been seeking for a while. This gives you the ability to not only add new image sizes, but to have them show up in the Media popover so that users can “Insert (the new image size) into Post”. http://networkedblogs.com/eCP0w

Creating the post thumbnails on this blog

WordPress Tips & Tricks

The thumbnails on this blog don’t look much different from most other thumbnails out on the web. They’re all set to a standard 650px wide by 120px tall, automatically cropped thanks to WordPress. But there are a few nice things happening behind the scenes, so I thought I’d share how I did it.

First, I added a few lines into… Read the rest

How to add custom RSS feeds or custom content to current feeds

WordPress Tips & Tricks

A client wanted their blog feeds, which were being syndicated via email by Feedburner, to include post author information and a ‘tweet this’ link at the top of each email between the title and post content.

By default Feedburner strips out the native RSS2 author info (no idea why, nor at the time of this writing does anyone on the… Read the rest