How to best delete orphan wp_postmeta
I’m in the middle of doing some fairly complex queries involving metadata from a custom post type. Unfortunately if any posts are deleted the metadata stays put which complicates matters as I am counting it. I was wondering how best to go about deleting the orphan metadata in the event that the post is deleted. … Read more