An Easy Way To Get the Contents of a Custom Field

If you do any hardcore WordPress coding, then you’re probably aware of Custom Fields and the unlimited possibilities they offer you as a WordPress designer or developer.  For instance, I use custom fields as a means of attaching a feature image and thumbnail to posts in my Proximity News Theme.

But, they can be a bit cumbersome to use throughout your theme because of the ridiculous amount of code that it takes just to pull the data out and display it. Read More

Premium or Freemium?

Quite a few months ago, I made a proposition to my readers. I put a call out for great designers, loyal to the idea of Open Source software, to contact me and collaborate on an idea that I thought would make many users in the WordPress community very happy.

Today, I want to put out a similar call for your input, and (in a roundabout way) give you more details about the upcoming project.

This idea of mine, which has been stewing since February, 2008, is very similar to the idea that my good friend Brian Gardner just announced over at his site.

So, I want to know from you, my loyal readers … what makes you lay down your hard earned cash when it comes to WordPress themes?

  • Is it the theme itself, features, innovation?
  • Is it the support that comes with a premium theme?
  • Is it the Documentation?
  • Is it the exclusivity (since popular free themes tend to be overused)?

I want to know! Premium themes are very popular right now … more so than they ever have been.  But there must be some reason we pay for a theme.  Are all premium themes really that much better than their free alternatives?

Second question, what if themes — good themes, great themes! — were available for free? Would you be inclined to send the author a “thank you donation”? Would you be willing to pay for support, documentation, tutorials, add-ons, etc.? What about people you know?  Would they be willing to pay for the added support, or would they be perfectly happy with just downloading the theme and nothing else?

I want your feedback! Either reply here in the comments, or hit me up on twitter with an @nathanrice reply.

Thanks!

Creating a “Blog Page” — With Paging

If there was one question I get asked the most about WordPress themes, it’s this one: how do I make a custom static homepage at the root of my blog’s address (e.g. http://example.com/) and have my blog posts go into a /blog section (http://example.com/blog)?

WordPress is becoming more and more usable as a Content Management System, so naturally the question comes up.

But they don’t want to abandon the idea of a blog either. Blogs can be an integral part of a business website, and it makes sense that businesses and individuals would want the site and the blog managed from the same WordPress installation. Read More

WordPress Single Post Templates

I’ve recently released a plugin that is far more robust than the methods outlined below. It actually duplicates the functionality of WordPress Page Templates, and allows you to create individual post templates, selectable on a per post basis via a dropdown menu. Head over to my WordPress Plugins page and find the “Post Templates Plugin”

UPDATED:
Austin recommends using a filter in your functions.php file as an alternative to the method below. IMO, his suggestion is much simpler and quite elegant. Here’s the code to add to your theme’s functions.php file. (be sure you paste this code between <?php ?> tags):

add_filter('single_template', create_function('$t', 'foreach( (array) get_the_category() as $cat ) { if ( file_exists(TEMPLATEPATH . "/single-{$cat->term_id}.php") ) return TEMPLATEPATH . "/single-{$cat->term_id}.php"; } return $t;' ));

It helps solve the multiple categories issue since it cycles through all the categories in the array and checks to see which one of them has an associated post template. When it finds one, it uses the post template file, but if it doesn’t, then it falls back on the default single.php template.

So if you are used to placing posts in multiple categories, be sure to only create post templates for the categories you know won’t ever conflict.

Again, I highly recommend using this technique. It’s much simpler and works much better. If you care to, however, the original article is still below.
END UPDATE

A few months ago, I wrote a post over at the Blog Herald explaining how to set up and use WordPress Page Templates to control the way indivudual WordPress “Pages” appeared on your blog.  The process was pretty simple … create the page template, insert the necessary code at the top of the file, and upload it to your themes folder.

What what about blog posts?  As far as I could tell, there’s no way to do a similar thing with single posts without some manual code (see the “Unique Single Template” section).

Is it possible to have post templates like page templates???

Cory sent me this simple question a few days ago, and it got me thinking. So I started investigating. Read More

WordCamp Recap, Part 1

I’m sitting in the airport, waiting for my flight, on my way back home from WordCamp Dallas, 2008. I finally got to meet a bunch of people that I respected and followed for a long time, as well as some friends, both long time and recent, that I’ve never met before. It was a very rewarding experience, without a doubt.

But the reason I wanted to post a recap of the weekend was to highlight all the cool stuff that was showcased at WordCamp this year. Read More