Add guid filter to attachment in media library grid mode

I’m trying to show in media modal box, attachments from a specific folder in my website and, correct me if I’m wrong, the best way to proceed is a like filter on wp_posts field GUID. Something like and ({$wpdb->posts}.guid LIKE '%/uploads_media_news/%')).

wp_postsGUID

Problem is I don’t really know where to apply this filter: is it better to act on backbone.js? On a .php file, perhaps ajax-actions.php?

I don’t really know what to do anymore, I’ve been working on this change for 3 days with no result.

0

Leave a Comment