Home Forums Plugin Support WP User Frontend Pro Inserting ACF Images

This topic is: not resolved

Tagged: ,

This topic contains 5 replies, has 2 voices, and was last updated by  Jeff Fisher 5 years, 1 month ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #17981

    Jeff Fisher
    Member
    Post count: 3

    I am using the advanced custom fields (ACF) plugin and need to drop an ACF created image onto my page.

    When I do the insert, all that gets shown is the image ID. The code shows and I get a broken link pic on my page.

    I have the ACF image element set to record ID, so I think this should work.

    Any ideas?

    #17995

    Mahi
    Member
    Post count: 1555

    So, you are using WPUF from frontend to insert/upload image or from backend by using ACF?

    If by WPUF, then check Documentation here: http://docs.wedevs.com/showing-meta-fields-in-frontend/

    #18004

    Jeff Fisher
    Member
    Post count: 3

    Still not working…

    ACF meta field is “coupon_img”

    The following code:

    ID, ‘coupon_img' );
    if ( $images ) {
    foreach ( $images as $attachment_id ) {
    $thumb = wp_get_attachment_image( $attachment_id, ‘thumbnail' );
    $full_size = wp_get_attachment_url( $attachment_id );
    printf( ‘%s‘, $full_size, $thumb );
    }
    }
    ?>

    Is not showing the image. Any other ideas?

    Should the ACF image be added as an Image Object, Image URL, or Image ID

    Thanks,

    Jeff

    On Thu, Apr 3, 2014 at 8:57 PM, weDevs Team wrote: > Mahi wrote:

    So, you are using WPUF from frontend to insert/upload image or from
    backend by
    using ACF?

    If by WPUF, then check Documentation here:
    http://docs.wedevs.com/showing-meta-fields-in-frontend/ [0]

    #18007

    Mahi
    Member
    Post count: 1555

    If i am not wrong then, ACF add

    acf_

    at front on each custom field's meta_key by default? isn't it?

    #18008

    Jeff Fisher
    Member
    Post count: 3

    Like this? $images = get_post_meta( $post->ID, ‘acf_coupon_img' );

    On Thu, Apr 3, 2014 at 9:49 PM, weDevs Team wrote: > Mahi wrote:

    If i am not wrong then, ACF add
    > acf_
    at front on each custom field’s meta_key by default? isn’t it?

    #18027

    Jeff Fisher
    Member
    Post count: 3

    When an image is saved to the database, how is it saved?

    Is it an object, ID or URL? Depending on how it is saved, I have different ways to show the image.

    Thanks

Viewing 6 posts - 1 through 6 (of 6 total)

The topic ‘Inserting ACF Images’ is closed to new replies.