I’m using advanced custom fields and have setup an image field for my users to add an image in their profile. I’d need to display this image on post pages, so i’ve tried the following…
<?php
$attachment_id = the_author_meta('author_logo');
?>
<?php echo the_author_meta('author_logo'); ?>
<?php wp_get_attachment_image_src( $attachment_id )?>
<?php wp_get_attachment_url( $attachment_id ); ?>
The output is always the image attachment ID never the URL. What can I change to output the image path URL?
Thanks
From codex:
So, replace
the_author_meta()
withget_the_author_meta()
. You can then use wp_get_attachment_image() to get an image element ready for outputting to the page.