Author Page custom field shows wrong content

Posted in: Newspaper
Post count: 6

I have created a custom profile field called “gallery”.
When I call this field on the Author page, it does show what is entered in the field
but it takes it from the logged-on user, my admin profile where it should display the
content of the Author which page is displayed.

This is the PHP code I use:
<?php echo get_the_author_meta(‘gallery’); ?>

I tried this but it does not work:
<?php $AuthorID = $curauth->ID;
echo get_the_author_meta(‘gallery’ . $AuthorID . ‘]’); ?>

Can you tell me what the code should be?
Best regards,

Peter

Post count: 35449

Hi,

So the php code need to be insert in theme files, this should work for standard templates, but for cloud templates I do not know if this it will work or not.

Also please notice that the custom code is not covered by the support theme -> https://forum.tagdiv.com/support-policy-2/ if you want us to help you with this you can make a request to our custom services from here -> https://tagdiv.com/premium-customization-services/

Thank you for your understanding!

Viewing 2 posts - 1 through 2 (of 2 total)
The forum ‘Newspaper’ is closed to new topics and replies.