For a little challenge I decided to turn his Photoshop file into actual code using CSS3 and a bit of JQuery. You can see a demo here or download the code (feel free to use in your own projects, no attribution necessary).
You can’t assume everyone is running the latest version of WordPress, especially around big point releases.
Simple Version Check
If you want your code to be backwards compatible (keep it within reason), you can do a simple WordPress version check with conditionals by using:
Or just use the global variable $wp_version.
The latest version of this Thematic Options theme has been completely rebuilt to use the Options Framework Plugin. It’s rather basic and has just a couple settings- but if there’s something else you’d like to see in it please file a ticket or send over a pull request on GitHub.
You can download the latest version of the Thematic Options on GitHub.
Explanation of Excerpts
There’s two ways main ways to display posts on the home page and archive pages in WordPress. The first is to use the_excerpt tag, which checks to see if an excerpt has been manually entered. If it has, WordPress will display it. If it hasn’t, it’ll take the first 55 words from the post and display that instead.
Using the_excerpt is a perfect way to display a tiny snippet of the post so people can easily scroll through all the topics. When using the_excerpt, WordPress will also automatically remove any images or html tags that might mess with the layout in a shortened version.
I recently updated Portfolio Press to use new icons for its custom post type. The previous icon worked fine, but it didn’t exactly match the rest of WordPress core. I was also lucky enough to have Ben Dunkle, the designer who created the current set of core WordPress icons, offer to make me a new one.
[Note, I no longer recommend including custom post types from a theme. Here's my Portfolio Post Type plugin on GitHub if you want to see example code]
I have a zip file of the icons I used (in psd format) which also has some other options we considered (briefcase, nicer weird eyeball) and the png files of the final choice. Feel free to use this in your own projects that need a portfolio icon. You can download it here.
There’s also a great collection of free custom post type icons available here for download which might have other icons you might be looking for.
Derek Herman just released OptionTree, a plugin that makes it easy to set up theme options in WordPress. You can easily add uploaders, colorpickers, radio boxes, text inputs, textareas, etc to a panel- and even more advanced stuff like post, tag and page selectors.
The interface as a whole is really nice- similar to GravityForms for the options set up and the WooThemes options panel in terms of actual design. I haven’t dug into the code too much, but it seems well written and commented.
I’m working on a WordPress theme project where the background needs to change randomly on each page load. To do this I added a body_class that generates a random number between 0 and 5 for me to use for styling (e.g. .random-1, random-2).
Just thought I’d post the snippet in case anyone was looking for something similar:
There are a number of solutions for rendering “non-standard” web fonts on your site. I was familiar with ones like SIFR and Cufon where it’s recommend to be used only on headers or certain spots of the website. I e-mailed TypeKit to see if it worked the same way, and got this reply from Mandy Brown:
“There’s no file size or speed issue with using Typekit for body text (as there would be with, say, using SIFR or Cufon). That said, you should make sure to use a font that works well at small sizes and renders acceptably cross-browser. Be sure to take a look at the browser screenshots before deciding on a font.”
Oddly, Google failed me on this question, so I thought I’d post it here for anyone else who was curious.
This video tutorial shows how to install WordPress on most any web host that uses cPanel, including BlueHost, InMotion, and HostGator. It shows how to upload the files, edit your wp-config.php file, create a database, create a database user, and then do the actual install.
I’ve been getting a lot of questions about how to use and set up the WordPress menu navigation, so I created this video tutorial to walk you through it. These menus are a new feature in WordPress 3.0, and you’ll know if your theme supports it by clicking on Appearance > Menus.
I’ve been working as freelance web developer for the last couple years working almost primarily with WordPress. I’ve enjoyed every minute of it, but I was recently offered the opportunity to work full time with Demand Media.
Demand Media runs eHow.com, Trails.com, Livestrong.com (among others) and social widgets that are viewed on millions of pages per day. It’s a really exciting company and position. Couldn’t pass it up. I start today, which also just happens to be my 29th Birthday.
Here’s all the links and details from my talk on Custom Post Types at WordPress Austin in 2010.