Skip to main content
  Tuesday, February 20, 2018
  2 Replies
  1.1K Visits
  Subscribe
Hi

Please can you tell me how is the folder structure stored? Is it stored using WordPress taxonomies or maybe a custom table?

I want to loop through all images that are in Folder 1, for example. Happy to do custom work to grab this info, I just want to know roughly how.

Also are there hooks available in case I want to add anything custom?

Thanks
D
Hi,

It's using Wordpress taxonomies.

If you want all images inside a folder then you can use this code

$attachments = get_posts( array(
'post_type' => 'attachment',
'posts_per_page' => -1,
'tax_query' => array(
array(
'taxonomy' => 'wpmf-category',
'field' => 'term_id',
'terms' => 6, // This is your folder id
)
)
));
var_dump($attachments); ?>


We don't have yet hook for developers, but it's planned for a next version.

Best regards
A
7 years ago
Great stuff

Thanks for your response, Damien
  • Page :
  • 1
There are no replies made for this post yet.