Support

Account

Home Forums Front-end Issues get first image in Wysiwyg Editor

Helping

get first image in Wysiwyg Editor

  • is someone know how to get the first image in Wysiwyg Editor? my field type is Wysiwyg Editor and i put images there using add media.

    i try this code but its not working

    <?php 
       $images = get_field('images'); 
       $firstimage = $images[0]; 
    ?>    
    
    <img src="<?php echo $firstimage['url']; ?>" /> 
  • You cannot do what you are attempting to do. Images added to a WYSIWYG field are not added to an image field.

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

You must be logged in to reply to this topic.