Skip to content

Instantly share code, notes, and snippets.

@bookchiq
Last active September 29, 2021 19:27
Show Gist options
  • Save bookchiq/ec951d634b8d3f108a2adf1e1dcb5f9a to your computer and use it in GitHub Desktop.
Save bookchiq/ec951d634b8d3f108a2adf1e1dcb5f9a to your computer and use it in GitHub Desktop.
Sometimes when using the WordPress importer, featured images aren't _quite_ imported but report that they were, throwing off has_post_thumbnail() results. This SQL checks if the "connected featured image" actually exists, and if not, removes the half-there connection.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment