WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Question:

First example: when getting options from the database for a plugin. You'd use get_option['plugin_optios'].

My question is how do you 'GET' data from another table? Like wp_usemeta.

I want to grab the 'usermeta' and display it on the front of the site. How do I do this?

share|improve this question
<?php 
$user_id = 9;
$key = 'last_name';
$single = true;
$user_last = get_user_meta( $user_id, $key, $single ); 
echo '<p>The '. $key . ' value for user id ' . $user_id . ' is: ' . $user_last . '</p>'; 
?>

More information here - http://codex.wordpress.org/Function_Reference/get_user_meta

share|improve this answer
    
Thank you for your help. – Wayne Hatter Jr. Aug 22 '12 at 13:09

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.