Get author image attachment URL on post page - I get ID but not URL (2 posts)

  1. Pete
    Posted 3 years ago #

    I'm using advanced custom fields plugin and have setup an image field for my users to add an image in their profile. I need to display this image on post pages, so i've tried the following...

        $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?


  2. nghoanghiep
    Posted 3 years ago #

    You can use: wp_get_attachment_url(), for example:

    to get featured image

    I'm sure it returns url

Topic Closed

This topic has been closed to new replies.

About this Topic