WordPress.org

Ready to get started?Download WordPress

Forums

FT Calendar
[resolved] Highlight current date? (13 posts)

  1. Eve Gan
    Member
    Posted 3 years ago #

    It is a great plugin, but how to highlight the current date?

    Try to look for its ID to add property but seems the plugin doesn't assign any for it.

    Been go through every search results of google but no luck yet. Anybody know which code or files I should modified in order to have that function work?

  2. Lew Ayotte
    Member
    Plugin Author

    Posted 3 years ago #

    Where do you want to highlight the current date? The full month and week calendar does highlight the current date.

  3. Eve Gan
    Member
    Posted 3 years ago #

    Hi Layotte,
    Please view this link http://poisefashion.com.au/WP/, it only highlighted the event date (16 & 17), I wish to add a color background for today's date (21th).

  4. Lew Ayotte
    Member
    Plugin Author

    Posted 3 years ago #

    Hrm... It looks like you found a bug. It should be there. Looking now.

  5. Lew Ayotte
    Member
    Plugin Author

    Posted 3 years ago #

    OK, somehow this bug got introduced... this is what you need to change.

    In /classes/class-shortcodes.php

    Line 427 should be:
    $cur_month = date_i18n( 'm' );

    Line 509 should be:
    $year = date_i18n( 'Y', $str_time );

    Line 702 should be:
    $year = date_i18n( 'Y', $str_time );

    Line 918 should be:
    $year = date_i18n( 'Y', $str_time );

    This should give you the class name "current_day" which was being used to highlight the current day.

    I'll add this fix to the next bug-fix release.

    Lew

  6. Eve Gan
    Member
    Posted 3 years ago #

    Thanks layotte, it works now :)
    http://poisefashion.com.au/WP/

  7. yabyumski
    Member
    Posted 3 years ago #

    Hi, Layotte
    First, it's a great looking plugin :))
    I'm using v1.0.3.6 and I can't find the lines you've specified.
    Can you point out these changes for this version?

  8. Lew Ayotte
    Member
    Plugin Author

    Posted 3 years ago #

    Hi yabyumski,

    You shouldn't need to do this with the latest version of the plugin. This fix has been applied to v1.0.3.6, so the 'current_day' class is already there.

    Lew

  9. yabyumski
    Member
    Posted 3 years ago #

    I'm quite new to WordPress, so can you show me how to do this 'cos it's not set up to highlight current date by default.
    Thanks for the quick response.

  10. yabyumski
    Member
    Posted 3 years ago #

    It's OK, I've done it... :))
    Again, BEST WP CALENDAR.
    Best regards, Ilija

  11. Lew Ayotte
    Member
    Plugin Author

    Posted 3 years ago #

    Thanks Ilija, that's weird, it should already be highlighting the current date by default. What did you do to fix it?

    Lew

  12. yabyumski
    Member
    Posted 3 years ago #

    In 'single-post-page-shorts.css' changed background color in
    #ftcalendar-table tr td.current_day {
    background: #FFF7D7;
    }
    #FFF7D7 is "too white" :)))

  13. Lew Ayotte
    Member
    Plugin Author

    Posted 3 years ago #

    Oh, you just want to change the color then.

    You actually shouldn't edit he single-post-page-shorts.css file, otherwise it will be overwritten when you upgrade. But you can overwrite the CSS by editing your theme's style.css file (or a custom style.css file).

    Basically you'd use the same code in there, except add !important... like:

    #ftcalendar-table tr td.current_day {
        background: #FFF7D7 !important;
    }

    Lew

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic