• Resolved mstein63

    (@mstein63)


    Last year I contacted you because the previous and next navigation buttons were showing a comma in the date between the month and year. I have the date formatted as F Y but the comma keeps showing up. You said the next release would include a filter to format this, but the option still isn’t available. What happened?

    Thanks,
    Mark

    Original thread closed, but here is the text of it:
    ——
    Remove comma in date when navigation button shows month and year

    Resolved mstein63 (@mstein63)
    1 year, 1 month ago

    The top of the calendar has navigation buttons to switch to the previous or next month. Normally, the button shows just the month, but if the date is going into a different year, it adds a comma and then the year. I have my dates formatted to display in F Y format but the buttons keep displaying in F, Y format
    (ie “January, 2021” instead of “January 2021”). How do I get rid of the comma?

    Thank you!

    The page I need help with: https://www.mediate-wnc.org/calendar

    Plugin Author Joe Dolson (@joedolson)

    1 year, 1 month ago

    Next release will include a filter (mc_month_year_format) that will allow this customization; right now, there’s no method to change that easily.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Joe Dolson

    (@joedolson)

    The filter is there; it’s not an option, and there was never an intention to make it an option.

    This would be the usage; you could add it to your theme’s functions.php file or via a custom plug-in:

    add_filter( 'mc_month_year_format', 'my_format' );
    add_filter( 'mc_month_format', 'my_format' );
    function my_format( $format ) {
        return 'F Y';
    }
    Thread Starter mstein63

    (@mstein63)

    Thank you – works perfectly!

    • This reply was modified 3 years, 2 months ago by mstein63.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Remove comma in date when navigation button shows month and year (follow-up’ is closed to new replies.