Custom Fields and Custom Metaboxes

You can manage darn near any kind of additional data with custom fields (think prices and sizes on products, or dates and times on events). Custom metaboxes ('metabox' is an all-purpose term for a box like the ones containing your categories, tags, or post formats) make it easier to enter the information that goes into your custom fields.

Now, for anyone out there who is thinking "That custom field thing sounds way too geeky to me, and probably boring, too"--I spent YEARS being intimidated by custom fields, and they're really not that hard. In fact, you might already be using them. If you've ever used Thesis or Elegant Themes, they make use of custom fields in order to display (in the first case) post thumbnails, and, in the second, video lightboxes.

I happen to think that using custom fields for post thumbnails/featured images is just a TEENSY bit outdated now that WP has them built in (no, I am not a fan of Thesis), but there was a time (about 2008) when that was the best way to include a featured image with your post and display it in your blog index.

I have been using (and it's still there on my site because who has time to redesign her own site these days) a theme with a portfolio post type that displays a long narrow screenshot in a custom field on the right side, and the project description on the right side.

If you've used Gravity Forms (or other forms plugins) to collect and display information from website visitors, the form fields are WordPress custom fields (at least the ones that don't map to normal post fields like title and content). I did this on a site where we were creating a testimonial upload form with extra photos and information.

On one recent client project, we used a custom field which would display a big "SOLD" overlay on products (in this case RV trailers) if she filled in the custom field. (It doesn't matter what she puts in there--the code just checks whether the field is empty.)

Another site I just worked on has several custom post types for different kinds of content. There are custom fields for things like SlideShare embed codes and YouTube embed codes. And guess what? If you put those embed codes into a custom field, you don't have to worry about the WP visual editor stripping out all the iframe stuff.

You can create custom fields on the fly. Displaying them takes a bit of tweaking to your theme, but is easier than I thought it would be. Making custom metaboxes so your clients have an easier time filling the custom fields in is slightly more work, but there are plugins and other tools to make that easier, too. (I did cheat on the BACN site and use the Types plugin, which is free and operates kind of like Gravity Forms for making custom post types, taxonomies, and fields/metaboxes all in one.) There's a companion plugin called Views for displaying the CPTs, and we bought it, but honestly it was easy enough to hand-code that in Genesis, so I didn't bother with it.

So what I'm saying here is that you can make much more interesting websites for yourself or your clients if you know something about custom fields, and you don't have to be a complete code genius to do it. So sign up if you think this could be useful.

 

Join or login to comment.

  • eve l.

    Great presentations! I think I finally understand Custom Fields and Custom Metaboxes.

    November 20, 2012

  • Sallie G.

    I think we managed to demonstrate the power of custom fields in WordPress, and to show that there are some options for non-developers to use them.

    November 20, 2012

  • Greg T.

    Excellent source of information. Top quality presenters. So much to go over, we went a half hour over.

    November 18, 2012

  • Douglas R.

    Good but was slow in parts and went long. Best stuff at end.

    November 18, 2012

  • Judy B.

    I was not able to attend the last meeting, and requested a refund. Was I in the time frame?

    September 19, 2012

  • Judy B.

    This sounds great, especially since I know how much time Sallie has devoted to this.

    September 19, 2012

  • Greg T.

    OK. Now that I have a date, I have something I can work towards.

    August 22, 2012

    • Sallie G.

      Glad you can make it. ;-)

      August 22, 2012

Your organizer's refund policy for Custom Fields and Custom Metaboxes

Refunds offered if:

  • the Meetup is cancelled
  • the Meetup is rescheduled
  • you can cancel at least 1 day(s) before the Meetup

Additional notes: Please e-mail anca [at] techliminal [dot] com to request your refund, since it's her PayPal account we use.

Payments you make go to the organizer, not to Meetup. You must make refund requests to the organizer.

Our Sponsors

  • Page.ly

    Pagely provides hosting for our new EastBayWP.com site

  • TechLiminal

    TechLiminal provides our awesome meeting space

  • JetBrains

    License to PhpStorm (raffle), June 2013 Meetup

  • AtContent

    March 2013 Sponsor: Lunch!

  • WP Engine

    Provided pizza and swag for February 2013 Meetup

  • WooThemes

    Pizza and Coupon Codes for November 2012

  • DISQUS

    DISQUS provided pizza at the July Meetup

  • PageLines

    Pizza for the Jan 2012 Meetup

  • Event Espresso

    ...donated us a copy of their premium plugin with all the goodies.

People in this
Meetup are also in:

Create a Meetup Group and meet new people

Get started Learn more
Henry

I decided to start Reno Motorcycle Riders Group because I wanted to be part of a group of people who enjoyed my passion... I was excited and nervous. Our group has grown by leaps and bounds. I never thought it would be this big.

Henry, started Reno Motorcycle Riders

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy