Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save klongdesigns/c0701a8634c957b13b17 to your computer and use it in GitHub Desktop.
Save klongdesigns/c0701a8634c957b13b17 to your computer and use it in GitHub Desktop.
SELECT post.post_title, post.post_name, tt.name
FROM `wp_posts` AS post
INNER JOIN `wp_term_relationships` AS terms ON ( post.ID = terms.object_id )
INNER JOIN `wp_term_taxonomy` AS tax ON ( terms.term_taxonomy_id = tax.term_taxonomy_id )
INNER JOIN `wp_terms` AS tt ON ( tax.term_id = tt.term_id )
WHERE post.post_type = 'post'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment