LUCiD GRAFiX Logo

Tutorial
YouTube RSS Feed
Search

TUTORIAL

Basic Custom Fields in WordPress

Written by Posted on March 7th, 2013 No Comments
Share This

Lets get started making Custom Fields in WordPress. First we will need:

  • functions.php
  • template page, page.php, single.php, index.php, etc. Where ever your trying to add the custom fields too.

Next, in your functions.php copy and paste this:

This will make it so your theme supports custom fields.

Next, copy and paste this in to the template page, page.php, single.php, index.php, etc. Where ever your trying to add the custom fields too. But remember it has to be with in the WordPress loop.

Where it says custom_field_name_example, change it to your unique ID.  Now, with in the if loop you can add whatever you want and when you call that custom field it will display it.

If you don’t see the custom fields, click Screen Options up by where it says Howdy, Your Name and check custom fields.

Custom Fields in WordPress

Above, where it says Name put in the unique ID and then where is says value put what you would want to be displayed. What ever you put in the if loop will be displayed when you call it. With a little bit of creativity you can put a whole section, ad, link, image, etc. This is a simple introduction to custom fields.

I found 2 great plugins that helps clean up the admin side and give more functionality:

Here is all the info you could want on Custom Fields from the WordPress Codex.

About

Hi, my name is Eric Young. I’m a web designer who has worked in the IT industry since 2000. I love blogging and making the web a better place. If I'm not here I'm probably playing Gears of War. LOL

Related Articles You Might Enjoy!

How to add featured Image in WordPress How to add featured Image in WordPress
http://codex.wordpress.org/WordPress_Feeds How to remove the authers name off a RSS feed in wordpress
read more How to add a Read More link in WordPress and limit the word count
Leave a comment

Leave a Reply