Update (10/11/2016): I added some escaping to the examples. Better safe than sorry. When creating an image custom field in Advanced Custom Fields, it gives you the option of setting the “Return Value” as an “Image Object”.
Posts Categorized: Snippet
My new best friend: ajax_query_attachments_args
I’m working on a site were users will have extra fields in their profiles, among them, a user picture. To achieve this, I used Advanced Custom Fields. Easy peasy lemon squeezy! The problem was that when a user went to upload or chose a file for their picture profile, it showed all media files, from… Read more »