Support

Account

Home Forums General Issues Best way to delete all images and meta attached to certain post type?

Helping

Best way to delete all images and meta attached to certain post type?

  • I have a custom post type called books, I have 1000s of images attached to these posts in books using an ACF gallery field for each post. How can I run a query to delete all of these images that are attached to this particular post type?

  • Can you give me a little more information?

    Where to you want to run this query, in a WP function or are you looking for a straight SQL statement you can run in phpMyAdmin?

    Is there one field name you’re looking to delete or several? What are the field names

    Is the Gallery field attached to just this post type or is it attached to other post types as well?

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Best way to delete all images and meta attached to certain post type?’ is closed to new replies.