WordPress for fun & profit, part deux

Last week we extolled the virtues of WordPress: it’s free, it’s super versatile, it’s really easy to use and it’s a fantastic way for a beginning coder to start working in a programming language and learning how to edit complex web applications.

Plus, WordPress hacking is a darn marketable skill. Again, just ask our good friend Zoe.

Today we want to teach you four awesome WordPress tricks that will take you from WordPress zero to WordPress hero in…only a few hours, or days, flat ;)


WordPress Trick #1: Child Themes

One of the best things to do when you are just learning WordPress is to begin by customizing an existing theme.

For example, you might have found a super duper awesome mobile responsive theme that is perfect, except instead of a white background, you want a nice purple one. And instead of orange links you want grey ones, and maybe you want to move a few other elements around.

You could go ahead and just hack into the theme’s files and call it a day. But then a few weeks in, the theme author releases a new version that fixes a bunch of Android bugs, you update your theme, and oh no! all of your changes have disappeared!!

Never fear, child themes are here.

The way child themes work in WordPress is that it creates a parent, the original theme, and a child, which is comprised only of things you want to change about the parent theme.

This way, you can customize the theme to your heart’s content without editing the original theme files, and as an added bonus, you can update to future theme releases without ever worrying about losing your work.

So how do you create a child theme? All you have to do is create a new folder with the same name as the original theme and title it like so:


The only file that’s required in that theme folder is a style.css document. You can then activate your child theme in the WordPress admin and WordPress will know what’s up.

Then whenever you want to customize a file, you can just copy/paste that file into your child theme and it will overwrite the one in your parent theme.

Learn more about child themes.


WordPress Trick #2: Custom Themes

Sometimes, it just isn’t possible to customize a theme and you have to build your own custom theme from scratch.

The best way to do this is to build off a super simple boilerplate theme and just hack that baby into submission. The reason is that there are a bunch of files that you have to have in your theme and it can be time consuming to track ‘em all down.

We recommend starting with the Starkers theme.


WordPress Trick #3: Custom Post Types

So the biggest development in the WordPress platform is that with the release of WordPress 3.0 you could create your own custom post types, meaning that you weren’t beholden to the native WordPress “post” and “page.”

What this did was make it possible to create much more robust content management systems using WordPress.

Adding custom post types is super simple & you can do it by adding just a few lines of code to your functions.php file in your theme:

add_action( 'init', 'create_post_type' );
function create_post_type() {
register_post_type( 'acme_product', array(
'labels' => array(
'name' => __( 'Products' ),
'singular_name' => __( 'Product' )
'public' => true,
'has_archive' => true,
'rewrite' => array('slug' => 'products'),

That said, the BEST way to do this is to actually create your own plugin so that you can have access to your custom post types regardless of what theme you are using. Check out this blog post from our friends at Team Treehouse about the best way to do this.


WordPress Trick #4: Custom Post Fields

Chances are that if you have some custom post types, you probably are gonna want to have some custom fields associated with those custom post types.

For example, if you create a custom post type called “Books” you might want to have fields for author, title, publication date, publishing house, price, etc.

WordPress makes it super easy to add custom post fields via the custom post fields section of any post form, but the super slick way to do this is to use a plugin called Advanced Custom Post Fields.

Also, should you keep going down the WordPress rabbit hole, we would like to recommend that you familiarize yourself with these three WordPress functions:

1. Function reference/add post meta

add_post_meta($post_id, $meta_key, $meta_value, $unique);

2. Function reference/update post meta 

update_post_meta($post_id, $meta_key, $meta_value, $prev_value);

3. Function reference/get post meta

get_post_meta( $post_id, $key, $single );

What these do is allow you to add, update and get post meta data from anywhere. Let’s say that in addition to using custom post fields in the wp-admin section of your site, you also create a form for the front of your site where people can add and edit information about books. You can take the information typed into the form and add it to the book post, or update an existing book post, using these two post meta functions:

add_post_meta(123, 'title', 'the title entered in the form', true);
update_post_meta(123, 'author', 'the author entered in the form');

You can use get_post_meta() to display any of the metadata that exists by name:

get_post_meta(123, 'title');

So those are our four WordPress tricks. Have you ever worked with the platform? Share your tips & tricks!

Your email address will not be published.



  1. Film streaming Replied

    Thank you for another great post. Where else could anybody get that type of information in such a perfect way of writing? I’ve a presentation next week, and I am on the look for such info.

  2. poker online indonesia Replied

    Hi, this is very awesome post, thank for sharing this info with us

  3. Gerry Walka Replied

    Hi there! I could have sworn I’ve been to this web site before but after looking at a few of the articles I realized it’s new to me. Anyhow, I’m definitely delighted I discovered it and I’ll be book-marking it and checking back regularly!

  4. slutshaming Replied

    Greetings! Very helpful advice within this post! It is the little changes that produce the biggest changes. Thanks for sharing!

  5. internet gratuit Replied

    I am not sure where you’re getting your information, but great topic. I needs to spend some time learning much more or understanding more. Thanks for excellent information I was looking for this info for my mission.

  6. gemmes clash of clans Replied

    Undeniably imagine that which you said. Your favourite justification seemed to be on the net the easiest factor to take into accout of. I say to you, I definitely get annoyed even as people think about worries that they just don’t recognize about. You controlled to hit the nail upon the top and also defined out the whole thing without having side effect , other people can take a signal. Will likely be back to get more. Thank you

  7. Film Streaming Replied

    Valuable info. Lucky me I found your website by accident, and I am shocked why this accident did not happened earlier! I bookmarked it.

  8. Clash of clans hack Replied

    I’ve observed that in the world the present day, video games would be the latest trend with children of all ages. Occasionally it may be extremely hard to drag your son or daughter away from the games. If you want the very best of both worlds, there are plenty of educational games for kids. Great post.

  9. films streaming gratuit Replied

    Hi, Neat post. There’s a problem with your website in internet explorer, would check this… IE still is the market leader and a large portion of people will miss your wonderful writing due to this problem.

  10. Olivia Eastwood Replied

    I have Firefox as my main web browser already, but I want my windows live messenger to open all windows on Firefox and not IE7. For example, the email icon on the top left hand corner of wlm. Every time I click on it, it opens up on IE7 which i don’t want, but on Firefox.. how do i remove ie7?.

  11. Jamel Karabin Replied

    I really love the way you discuss this kind of topic.~;í.~

Want more articles like this?

Sign up to get the most recent tech news, tips and career advice.