The Lodge is members-only design/dev videos and Office Hours.

Next Office Hours Session: "Implementing an SVG Icon System" Nov 30 - 6:00 PM Eastern

Retrieving the Attachment ID

  • # January 3, 2013 at 11:48 am

    @chrisburton Thanks a bunch bud!!!!! I saw that SE question last night, but obviously I was too tired to process.

    This seems to work:

    $attachment_id = get_sub_field(‘background_photo’);
    $image_attributes = wp_get_attachment_image_src( $attachment_id, $size );
    echo $image_attributes[0];

    # January 3, 2013 at 11:58 am

    Awesome. Glad you solved it.

Viewing 2 posts - 16 through 17 (of 17 total)

You must be logged in to reply to this topic.

There's a whole bunch of content on CSS-Tricks.

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed