WordPress.org

Ready to get started?Download WordPress

Forums

Calendar Category
I make It works with Future Posts! (13 posts)

  1. chavo
    Member
    Posted 1 year ago #

    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.

    http://wordpress.org/extend/plugins/calendar-category/

  2. bwhontwerpers
    Member
    Posted 1 year ago #

    Thanks Chavo, you just made my day...

  3. damian.smith
    Member
    Posted 1 year ago #

    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 :)

  4. chavo
    Member
    Posted 1 year ago #

    You are welcome!

  5. AllTech
    Member
    Posted 1 year ago #

    I spent hours to have same results, thanks !

  6. alvares
    Member
    Posted 1 year ago #

    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.

  7. chavo
    Member
    Posted 1 year ago #

    "future" status does really exist?

    I use a plugin called "no future posts" to pull future posts.

  8. alvares
    Member
    Posted 1 year ago #

    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?

  9. chavo
    Member
    Posted 1 year ago #

    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.

  10. alvares
    Member
    Posted 1 year ago #

    Yeah.

    http://www.tiagoalv.es/calendario/

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

  11. chavo
    Member
    Posted 1 year ago #

    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).

  12. DougM
    Member
    Posted 1 year ago #

    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?

  13. robertosalemi
    Member
    Posted 4 months ago #

    Thanks to all!

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

    Thanks!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.