• I made a post and changed the date to about a week from now (as a reminder or todo). However, it does not show up in the calendar view in my archives, only in the list of posts by month on the achives page.

    Is there any way for it to appear as a clickable link in the calendar view?

Viewing 2 replies - 1 through 2 (of 2 total)
  • In wp-includes/template-functions-general.php and look for the “get_calendar” function.


    $ak_post_titles = $wpdb->get_results("SELECT post_title, DAYOFMONTH(post_date) as dom "
    ."FROM $wpdb->posts "
    ."WHERE YEAR(post_date) = '$thisyear' "
    ."AND MONTH(post_date) = '$thismonth' "
    ."AND post_date < '".current_time('mysql')."' "
    ."AND post_status = 'publish'"
    );

    You want to remove the AND post_date < ‘”.current_time(‘mysql’)… line.

    Thread Starter drews167

    (@drews167)

    I also had to edit this section:

    $dayswithposts = $wpdb->get_results(“SELECT DISTINCT DAYOFMONTH(post_date)
    FROM $wpdb->posts WHERE MONTH(post_date) = $thismonth
    AND YEAR(post_date) = $thisyear
    AND post_status = ‘publish’
    AND post_date < ‘” . current_time(‘mysql’) . ‘\”, ARRAY_N);

    I changed the “post_date” to “0” (zero) beacause I couldn’t figure out the syntax behind it. That seems to have resolved the issue, though. Thanks for the help.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘posts set in the future’ is closed to new replies.