SELECT DISTINCT
post_title
, concat('https://www.thewebsite.gr/',post_name)
,(SELECT group_concat(wp_terms.name separator ', ')
FROM wp_terms
INNER JOIN wp_term_taxonomy on wp_terms.term_id = wp_term_taxonomy.term_id
INNER JOIN wp_term_relationships wpr on wpr.term_taxonomy_id = wp_term_taxonomy.term_taxonomy_id
WHERE taxonomy= 'category' and wp_posts.ID = wpr.object_id
) AS "Categories"
FROM wp_posts
WHERE post_type = 'post'
AND post_status = 'publish'
ORDER BY
id DESC
Εξαγωγή των άρθρων με βάση την κατηγορία
Δημοσιεύθηκε στην Wordpress. Αποθηκεύστε τον μόνιμο σύνδεσμο.