Question

If I wanted to get a custom field of the current user I would use something like this.

<?php echo get_user_meta($user_info->ID,'address_line_2',true);?>

This time however I want the author so I tried multiple version of the following to no avail.

<?php 
$thisauthorID = get_the_author_ID();

echo get_the_author_meta($thisauthorID,'address',true)
        ;?>

Any ideas?

Marvellous

Was it helpful?

Solution

get_the_author_meta() != get_user_meta().
Change to:
echo get_the_author_meta('address', $thisauthorID);

Licensed under: CC-BY-SA with attribution
Not affiliated with wordpress.stackexchange
scroll top