1

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?

2
<?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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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