Viewing 1 reply thread
  • Author
    Posts
    • #3270
      azizultex
      Member

      Hi,
      I am trying to get uploaded image link from Widget repeating field. The field looks like the attachment below. I am able to pull all fields data except the image.

       $social_medias = $settings['social_media'];
       $social_medias = parse_piklist_array( $social_medias , true);
         echo '<ul id="list-social" class="clearfix">';
         foreach($social_medias as $social_media) {
           echo "<li>{$social_media['icon_class']}</span> {$social_media['link']} <span> {$social_media['icon_upload']}  </span>
      echo '</ul>'; 

      Could anyone let me know how do I get the image links here?

      Thanks

      Attachments:
      You must be logged in to view attached files.
    • #3272
      Jason
      Keymaster

      Greetings!

      Someone just made a similar issue here: https://github.com/JasonTheAdams/PiklistHelper/issues/2

      So don’t use parse_piklist_array anymore. Once you’ve done that, checkout wp_get_attachment_image_src to retrieve the url for the image id that you’re being returned.

      Hope this helps! 🙂

Viewing 1 reply thread
  • You must be logged in to reply to this topic.