Support » Fixing WordPress » wp_get_attachment_url( [postID] );

  • Hello all,

    I’m trying to display an attached image in my template. I’m using
    wp_get_attachment_image for tis, like so:

    <?php wp_get_attachment_image( $post->ID, 'full' ); ?>

    Unfortunately, it won’t work: no code is returned.

    I have added the image inside the post, so it is now an attachment to that post, right?

    Is there a way access an attachment by URL? That way I can check whether the function should output something, or if the image I have added to the post doesn’t register as an attachment.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘wp_get_attachment_url( [postID] );’ is closed to new replies.