As much as I love WordPress’ custom post types, one of the things that put me off from using them much is that (I thought at first) I couldn’t use them with normal categories and post tags, which is a pain if you’re trying to migrate an old install to use the new functionality. Luckily, while the documentation doesn’t go out and say so, but you can use register_taxonomy to override the default core behavior to include your custom post types.
First, a refresher:
register_taxonomy($taxonomy, $object_type, $args);
$object_type accepts a string or an array of post types, including your own custom post types! Here’s an example:
register_taxonomy( 'category', array('post', 'custom_post_type_1', 'page', 'custom_post_type_2'), array(
'hierarchical' => true,
'update_count_callback' => '_update_post_term_count',
'query_var' => false,
'rewrite' => false,
'public' => true,
'show_ui' => true,
'_builtin' => true,
) ) ;
The above code will now add a category option to your pages and custom types :)
Baller Basic is an advanced, customizable, clean, basketball-centric theme with four color options, carousel, featured posts, widgets, gravatar and WP PageNavi support and many other features built-in out of the box. Download Baller Basic, a Free WordPress Theme.
Baller Basic screenshot
Feature List
- Built in WP Pagenavi support
- Built in FFN Carousel support (bundled with theme)
- Built in asides support via custom field (set
aside to true)
- Five Widget Areas
- Sidebar
- 300×250 ad space
- 3 Footer Widget Areas
- Two layout options
- Basic blog
- Post Boxes (ala Derek Punzalan’s The Unstandard)
- Four color schemes
- Ability to exclude posts from n categories in front page
- Ability to highlight first n posts in front page
- Customizable secondary navigation bar
- Three ways to set featured posts
- Feature a single category
- Feature posts via a custom field
- Feature sub-categories inside a parent category
WordPress 2.7 introduced sticky posts into the core code, but despite the fact that a lot of themes prior to 2.7 used several methods to emulate the feature, it hasn't seen a whole lot of adoption, and I think it has a lot to do with how it's treated. After all, stickies are stickies; they're only used for announcements and such. But here's the thing... they don't have to be just announcements!
In this post we'll take a look at putting...
One of the things I always end up doing when making a WordPress theme is adding some sort of automatically generated post image functionality, and over the years, have gone through a lot of methods, from custom fields, preg_matching inline images, short codes, and even creating a new table to hold them in. As of version 2.9 however, WordPress introduced my favorite feature since built-in tagging: post thumbnails.
To use it, your theme must support it, and that's fairly easy to...
WordPress 3.0 is just around the corner, and we’re busy here at the WordPress Gym making changes to this theme (which we’ll be releasing next month) and many others. If you want to get in on the fun, the good folks at Million Clues has a great writeup on how to make your own themes WordPress 3.0 compatible. Great work guys!
Hey gym rats! If you've taken the time (and were bored enough) to scroll down to this site's footer, you'll probably notice a link to Blueprint CSS, and with good reason: this site is built on several bits and pieces found in that CSS framework. If you don't know about it yet, Blueprint gives you a solid foundation to build your project on top of, with an easy-to-use grid, sensible typography, useful plugins, and even a stylesheet for printing. All...
One of the first WordPress plugins I wanted to do back in the day was something that would show posts similar to what's currently being read; in short, a related posts plugin. Yeah there are a lot of them now, and for quite some time I was using YARPP, which has a ton of options. But what I never did like about YARPP, and my own custom solution prior to YARPP, was that it's heavy. Well, it had to be,...
Hey gym rats! Today we'll be looking at one of the tools you can use to beef up your WordPress blog: the FTP client.
What's FTP, and what's an FTP Client?
Glad you asked! Let's check with WikiPedia on this one: File Transfer Protocol (FTP) is a standard network protocol used to copy a file from one host to another over a TCP/IP-based network, such as the Internet. An FTP client is what you'd use to get on the File Transfer Protocol,...