Word Press Tags php select script.

 

php ile WordPress deki tagları çekmek.

SELECT slug FROM wp_terms
INNER JOIN wp_term_taxonomy
ON wp_term_taxonomy.term_id = wp_terms.term_id
INNER JOIN wp_term_relationships
ON wp_term_relationships.term_taxonomy_id = wp_term_taxonomy.term_taxonomy_id
WHERE taxonomy = “post_tag” AND object_id = X;

X  yerine post id numarasini yazıyoruz.

 

yeni tag eklemek için aşağıdaki kodu kullanabilirsiniz
$tags = implode(‘,’, $tagslist);

 

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)