2

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.

1
  • I think I'm moving closer to a solution: thanks to this solution, I modified the function to check if(isset($meta['file']) && strpos($meta['file'], 'media_news') !== FALSE). The problem now is .png images wont show.
    – user114036
    Commented Feb 24, 2017 at 11:21

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.