Skip to content

Instantly share code, notes, and snippets.

@lrtrln
Last active March 1, 2017 15:02
Show Gist options
  • Save lrtrln/c5575629870bfe4975372068a2d88ab5 to your computer and use it in GitHub Desktop.
Save lrtrln/c5575629870bfe4975372068a2d88ab5 to your computer and use it in GitHub Desktop.
Wordpress : list all terms from a taxonomy
SELECT t.name, t.term_id FROM wp_terms AS t INNER JOIN wp_term_taxonomy AS tt
ON tt.term_id = t.term_id
WHERE tt.taxonomy IN ('tax')
ORDER BY t.name ASC LIMIT 0 , 500
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment