• What do I do to get the calendar to show only the past month’s days with posts instead of having links to the previous months?

Viewing 4 replies - 1 through 4 (of 4 total)
  • I’d like to know this too. If I find out I’ll come back and post here.

    https://www.ads-software.com/support/topic/34346 (talks about adding stuff, very short)

    https://www.ads-software.com/support/topic/20609 (talks about location of the file)

    Found some others too. I’m going to try to develop my own expanded calendar, will let you know how it turns out.

    I made my own plugin which goes back 6 months, but I’m not ready to release it yet. I don’t know enough about WP to support users if they have problems applying or using it.

    Thread Starter miketerr

    (@miketerr)

    Hello. Thanks for the advice. How’s your plugin going?

    I’m still trying to figure out how to remove the links to previous months. I think it has something to do with this bit of code (Correct me if I’m wrong):

    // Get the next and previous month and year with at least one post
    $previous = $wpdb->get_row(“SELECT DISTINCT MONTH(post_date) AS month, YEAR(post_date) AS year
    FROM $wpdb->posts
    WHERE post_date < ‘$thisyear-$thismonth-01’
    AND post_status = ‘publish’
    ORDER BY post_date DESC
    LIMIT 1″);
    $next = $wpdb->get_row(“SELECT DISTINCT MONTH(post_date) AS month, YEAR(post_date) AS year
    FROM $wpdb->posts
    WHERE post_date > ‘$thisyear-$thismonth-01’
    AND MONTH( post_date ) != MONTH( ‘$thisyear-$thismonth-01’ )
    AND post_status = ‘publish’
    ORDER BY post_date ASC
    LIMIT 1″);

    Though I don’t know where to start messing around with it. It’s under the wp-includes\template-functions-general.php file.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Calendar – 1 month only’ is closed to new replies.