Pergunta

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

Foi útil?

Solução

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

Licenciado em: CC-BY-SA com atribuição
Não afiliado a wordpress.stackexchange
scroll top