Return data from an image file in custom field
-
Hi,
I’m using pods with the WordPress Theme Avada to create a custom pod named “Team Member” (team_member). In this pod I’ve created 3 fields : role(text), citation(text) and an photo_profil (file/image/video).
In my wordpress theme, I can create post card layout that can iterate through all my “Team Member” entries. With this method, I can easily pull out text fields by adding a custom field (with my theme) and reference the name of the field.
But I don’t know how to pull out data from a file/image/video field. If I use a php function, I’ve seen that the return type is an Array and I’ve managed to see the content. For ex:
ID = 357 post_author = 1 post_date = 2023-10-20 10:58:35 post_date_gmt = 2023-10-20 08:58:35 post_content = post_title = celine post_excerpt = post_status = inherit comment_status = closed ping_status = closed post_password = post_name = celine to_ping = pinged = post_modified = 2023-10-20 11:00:19 post_modified_gmt = 2023-10-20 09:00:19 post_content_filtered = post_parent = 358 guid = https://dev.powerofwe.ch/wp-content/uploads/2023/10/celine.webp menu_order = 0 post_type = attachment post_mime_type = image/webp comment_count = 0 pod_item_id = 357
My field name is photo_profil. I tried differents ways to get the url of the image, but without success. For ex:
photo_profil.guid or photo_profil._guid or @photo_profil.guid or photo_profil['guid'] ... .. .
Could you help me to return data from this file/image/video array?
Thanks a lot!
Alex
- The topic ‘Return data from an image file in custom field’ is closed to new replies.