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…

    Thanks!

    -Doobie

    # July 13, 2010 at 10:30 pm

    the_meta() by default displays both keys and values:

    http://codex.wordpress.org/Function_Reference/the_meta

    # 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.

*May or may not contain any actual "CSS" or "Tricks".