Hi there,
I’m using the ‘page link’ option when creating a custom field and wondered whether it was possible to return more than just an array of the post’s URL’s on the front end?
Basically I’m using the field to select pages from a certain post type when creating a page. I’m then creating a widget in the sidebar that will serve up the ‘featured image’ of the posts selected, and having each of those ‘featured images’ then link to their corresponding post (permalink).
Ideally these would be returned in a list format.
Could you let me know if this is possible. Any help at all would be much appreciated.
Thanks,
Luke
Hi @lukeetheridge
The page link field type will return only a URL.
The post object field type will return all the post data!
Please use the post object field type, read the docs and modify your code to render out the image, title and permalink url.
Thanks
E
Thanks @elliot, was exactly what I needed.
I posted this on the WordPress support for the plugin too but I’ll link back to this post for the answer 🙂
Thanks again,
Luke