• Here I explained how I harcoded the plugin in my functions.php archive.

    Now, I want to share with all of you how to make plugin to work with Future Posts.

    Just look at this part of the code:

    // Get days with posts
    $sql = "SELECT DISTINCT DAYOFMONTH(post_date)
    	FROM $wpdb->posts " . calcat_maybe_single_category_joins( $category ) . "WHERE MONTH(post_date) = '$thismonth'
    	AND YEAR(post_date) = '$thisyear'" . calcat_maybe_single_category_cat( $category ) . "
    	AND post_type = 'post' AND post_status = 'publish'
    	AND post_date < '" . current_time( 'mysql' ) . '\'';

    Remove “AND post_date…”. The code have to look like this:

    $sql = "SELECT DISTINCT DAYOFMONTH(post_date)
    		FROM $wpdb->posts " . calcat_maybe_single_category_joins( $category ) . "WHERE MONTH(post_date) = '$thismonth'
    		AND YEAR(post_date) = '$thisyear'" . calcat_maybe_single_category_cat( $category ) . "
    		AND post_type = 'post' AND post_status = 'publish'";

    I hope it helps you!

    ps: sorry for my english.

    https://www.ads-software.com/extend/plugins/calendar-category/

Viewing 12 replies - 1 through 12 (of 12 total)
  • Thanks Chavo, you just made my day…

    LEGEND!

    I had the original calendar set up to show future posts no problem and got concerned after I installed this plugin as it cancelled out my hacks, but now all good again ??

    Thread Starter chavo

    (@chavo)

    You are welcome!

    I spent hours to have same results, thanks !

    alvares

    (@alvares)

    In line
    AND post_type = 'post' AND post_status = 'publish'";

    ‘publish’ or ‘future’?

    to “publish” isn’t working, and with “future” upcoming events appear but clicking appears page 404.

    Thread Starter chavo

    (@chavo)

    “future” status does really exist?

    I use a plugin called “no future posts” to pull future posts.

    alvares

    (@alvares)

    ok. thanks Chavo.

    I used a function to show future posts that did not work. Now the plugin No Future Post ran.

    But there is something even in the day that there future posts, the “title” does not appear with the names of the posts, there is something to be done so they appear when you hover the mouse?

    Thread Starter chavo

    (@chavo)

    Can you show me a link? In my calendar when I hover my links it doesn’t show anything because It uses the default calendar hacked.

    alvares

    (@alvares)

    Yeah.

    https://www.tiagoalv.es/calendario/

    See the post today, with the hover appears the title of the post.
    In the other, future, don’t appear.

    Thread Starter chavo

    (@chavo)

    Tiago, tú me enviaste el email. Estamos hablando en inglés pudiendo hablar tranquilamente en espa?ol. Posiblemente el plugin que mencionas hackea el calendario default o genera el propio y permite que se vean los títulos de los posts. No es un problema con Future posts me parece sino con cómo de genera el calendario por default (o quizás me esté faltando algún parámetro).

    DougM

    (@dougm)

    this works well except for the above mentioned issue that the a-href “title” does not display on mouse hover in the calendar for future events (works ok for past events).

    I installed the “no future posts” plugin in addition..
    advice?

    Thanks to all!

    With hack in the plugin ‘Calendar Category’ and with the plugin ‘No Future Posts’, I managed to publish future posts.

    Thanks!

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘I make It works with Future Posts!’ is closed to new replies.