SQL query for a italian post?
-
Hi I can’t see in any post here on how to call a Post with Italian, Spanish or English translation. Below is a code that I put on my custom plugin but it calls all languages and translation. How can I specify it to call Italian, English or Spanish?
$sql="SELECT ID,post_excerpt FROM wp_posts WHERE post_status = 'publish' AND post_type = 'postitem' ORDER BY post_date DESC"; $aitem = array(); $posts = $wpdb->get_results($sql); foreach ($posts as $post){ $aitem[$post->ID] = $post->post_excerpt; }thanks TIA
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘SQL query for a italian post?’ is closed to new replies.