The Lodge is members-only design/dev videos and Office Hours.

Next Office Hours Session: "SVG" Oct 14 - 6:30 PM Eastern
Get a free trial // Grow your CSS skills // Land your dream job

Display WP custom field Key & Value

  • # July 13, 2010 at 3:30 pm

    Hello Tricksters,

    I’m trying to echo a custom field key and value pair. I know how to echo just the value associated with the key, but am wondering if there is a shortcut for echoing both the value and the key. It seems silly to have to hard code the Key Title into a theme file to display it, but if that’s the case…



    # July 13, 2010 at 10:30 pm

    the_meta() by default displays both keys and values:

    # July 14, 2010 at 7:52 pm

    Thanks Chris! That’s just what I was looking for.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

There's a whole bunch of content on CSS-Tricks.

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed