Support

Account

Forum Replies Created

  • @hube2 The problem with this:

    red : <img src="url-of-red.jpg">
    yellow : <img src="url-of-yellow.jpg">

    Is that , when adding post type, it saved the value (red or yellow)

    When you want to load the public page to include the Image (<img..) , you don’t get it , so you end up getting the value only

  • @hube2
    I created a custom post 1, added ACF fields (image name and image to return image URL).
    Then on the ACF fields groups of another custom post 2, I selected Post Object field to return ID then…. On the Add New post of the Custom Post 2, i get a drop-down (select field) of the ACF fields meant for custom Post 1.

    On the public page, I used the exact code as above and I get the image correctly.

    $iconImage = get_field('icon_image', $section['icon_selector']);
    ---
    <img src="<?php echo $iconImage; ?>" alt="<?php get_field('icon_name', $section['icon_selector']); ?>">

    My challenge is the Drop Down/Select on the custom post 2 to select the image. It only shows the title of the record saved in custom post 1. How can I make this select field show image also?

    `

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