I have some custom fields for my Registration Form and I want to display those on my theme's ‘author.php' page. I cannot get them to display the data using the syntax from the documentation. Is there a different treatment for registration form custom fields? I can get it working fine for regular forms on posts.
`get_post_meta()` is for posts, `get_user_meta()` is for registration or users custom field.
One more thing, `$post->ID` refers to the post ID, where for authors profile, you need to get the user ID. To get the current users ID, add this code after `get_header()`:
$curauth = (get_query_var(‘author_name')) ? get_user_by(‘slug', get_query_var(‘author_name')) : get_userdata(get_query_var(‘author'));
Now you can show the user location like this
[php]<?php echo get_user_meta( $curauth->ID, ‘location', true ); ?>[/php]