Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
I'm trying to edit the built-in calendar, and I want to change the database query, that's what I wrote, but something is not right here:
$dayswithposts = $wpdb->get_results("SELECT DISTINCT DAYOFMONTH(wposts.post_date)
FROM $wpdb->posts wposts, $wpdb->postmeta wpostmeta, $wpdb->term_relationships wcategory
WHERE wposts.ID = wpostmeta.post_id
AND wposts.ID = wcategory.object_id
AND wcategory.term_taxonomy_id = '82'
AND wposts.post_date >= '{$thisyear}-{$thismonth}-01 00:00:00'
AND wposts.post_type = 'post' AND wposts.post_status = 'publish'
AND wposts.post_date <= '{$thisyear}-{$thismonth}-{$last_day} 23:59:59'", ARRAY_N);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question