add new concurs

This commit is contained in:
2022-04-06 00:10:37 +03:00
parent 1c53718658
commit 25df0b2c10
9 changed files with 295 additions and 21 deletions

View File

@@ -15,7 +15,10 @@ function calend_block($month, $year, $script=false){
$find_sql = "
SELECT `post_id`
FROM `wp_postmeta`
WHERE `meta_key` = 'startevent' AND `meta_value` BETWEEN '$year-$str_month-01T00:00:00' AND '$year-$str_month-31T23:59:59'
WHERE `meta_key` = 'startevent'
AND `meta_value`
BETWEEN '$year-$str_month-01T00:00:00' AND '$year-$str_month-31T23:59:59'
";
@@ -26,7 +29,7 @@ function calend_block($month, $year, $script=false){
if ($ins !== '') {
$posts = db_get("
SELECT ID, post_date, post_title FROM `wp_posts` WHERE ID IN ($ins)
SELECT ID, post_date, post_title FROM `wp_posts` WHERE ID IN ($ins) AND `post_status` = 'publish'
");
}