Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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
add comment

1 Answer 1

<?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
add comment

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.