Thanks so much for that code, I added it today and it’s fetching the title which is brilliant.
I am still struggling with the srcset images though.
If you look here (it’s a tiny url to bypass the coming soon page and to stop the domain coming up in search results)
You’ll see the 2 identical images of food stacked on top of eachother. When you inspect them, the size is listed as 741 x 1000 which is correct BUT when you look at the src image, even though the file name has -741×1000.jpg at the end of it, the intrinsic size is actually the full size? It’s the same for every image listed in the srcset?
it does this if I have it set to medium or home_portrait but not if I switch it to thumbnail
I’m sorry if the answer to this is in the comments you have already made but I jusy don’t get why? If I copy one of the URLS and paste it in a new window, the dimensions of the image appear to be correct so I don’t get why the intrinsic size seems to be listed wrong?
Am I missing something here?
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
2022 was a big year for Advanced Custom Fields, with more capabilities, a new generation of ACF Blocks, a refreshed UI, and a new home. Our year in review post looks at advancements we’ve made and offers a glimpse of the future.— Advanced Custom Fields (@wp_acf) January 6, 2023
© 2023 Advanced Custom Fields.