List Posts French

[insert_php]
$terms = get_terms(‘province’);
foreach ( $terms as $term ) {
echo $term->slug.’
‘;
}
$posts = get_posts( array(‘posts_per_page’=>999,’orderby’=>’post_name’,’order’=>’ASC’,’post_type’=>’dojo’,’post_status’=>’publish’));
$i=0;
print “PROVINCE/LANG – “.$_GET[‘prov’].’/’.$_GET[‘lang’].”
“;
foreach($posts as $post) {
echo ++$i.’ – ‘.$post->post_title.’ – ‘.$post->post_name.’
‘;
$terms = get_the_terms( $post->ID , ‘province’ );
// Loop over each item since it’s an array
if ( $terms != null ){
foreach( $terms as $term ) {
// Print the name method from $term which is an OBJECT
print $term->slug.’
‘ ;
// Get rid of the other data stored in the object, since it’s not needed
unset($term);
}
}
//var_dump($item);
//print $post[‘post_name’].’ – ‘$post[‘post_title’].’ – ‘$post[‘province’].’
‘;
}
//var_dump($posts_array);
[/insert_php]