Created
September 13, 2018 17:48
-
-
Save seanbehan/994cd96a2a3febc94cb5d50f5364de6e to your computer and use it in GitHub Desktop.
get list of wordpress post tags and taxonomies
Group by taxonomy and agg post titles
select x.taxonomy as taxonomy, left(t.name, 50) as post_title, left(group_concat(p.post_title, ' '), 50) as name
from
wp_terms t,
wp_term_taxonomy x,
wp_term_relationships r,
wp_posts p
where
t.term_id = x.term_id
and
x.term_taxonomy_id = r.term_taxonomy_id
and
r.object_id = p.ID
group by
x.taxonomy, t.name
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
With group by post title