Bonjour,
comme indiquer dans le titre je souhaite utiliser mon calendrier pour une categorie spécifique « events ».
Pour cela j’ai remplacé dans le fichier general-template.php
$dayswithposts = $wpdb->get_results(« SELECT DISTINCT DAYOFMONTH(post_date)
FROM $wpdb->posts WHERE post_date >= ‘{$thisyear}-{$thismonth}-01 00:00:00’
AND post_type = ‘post’ AND post_status = ‘publish’
AND post_date <= '{$thisyear}-{$thismonth}-{$last_day} 23:59:59'", ARRAY_N);
par :
$dayswithposts = $wpdb->get_results( » SELECT DISTINCT DAYOFMONTH(post_date)
FROM $wpdb->posts
LEFT JOIN $wpdb->term_relationships ON($wpdb->posts.ID = $wpdb->term_relationships.object_id)
LEFT JOIN $wpdb->term_taxonomy ON($wpdb->term_relationships.term_taxonomy_id = $wpdb->term_taxonomy.term_taxonomy_id)
LEFT JOIN $wpdb->terms ON($wpdb->term_taxonomy.term_id = $wpdb->terms.term_id)
WHERE $wpdb->terms.term_id = ’events′
AND $wpdb->term_taxonomy.taxonomy = ‘category’
AND MONTH(post_date) = ‘$thismonth’
AND YEAR(post_date) = ‘$thisyear’
AND post_type = ‘post’ AND post_status = ‘publish’ « , ARRAY_N);
et ça ne marche pas!!
n’étant pas une as du Php je n’arrive pas à voir mon erreur…
merci beaucoup à ceux qui prendront le temps de m’aider 🙂