Support » Plugin: The Events Calendar » [Plugin: The Events Calendar] Displaying Current month & year on Events Calendar

Viewing 9 replies - 1 through 9 (of 9 total)
  • I found this via their website:

    Current Month Date
    Returns a formatted date string of the currently displayed month (in “jump to month” mode)

    More Info
    return: Name of the displayed month.
    since: 2.0

    SO I ended up putting this in my grid.php file (found at plugin folder/views/gridview.php)

    <h1><?php tribe_get_displayed_month(); ?></h1>

    NOTHING appears…

    HAR HAR. i missed echo

    <h1><?php echo tribe_get_displayed_month(); ?></h1>

    and like the wordpress forums intended, users will talk to themselves and figure it out. Thanks for the stage and time wordpress. Once again I shamed myself. Hope this helps someone in the future.

    Thank you very much for posting what you found! This helped me tremendously!

    Plugin Author Rob La Gatta


    Big thanks here, Kevin Kwok! We really appreciate you taking the time to come back and post this, and as you can see, at least kshapiro found it valuable. Cheers…if you’re ever interested in going PRO, shoot us an email (pro /a/ and we’ll see if we’ve got any open coupon codes we can hook you up with.

    Did you figure out how to get the year to display? I have the month but the year is giving me some issues.

    I just used <?php echo tribe_get_displayed_month(); ?> and it echos the month and the year.

    Thanks for the follow up and solution kshapiro!

    Jumping in on this a little bit late.
    I had the exact same problem however managed to sort it out using the details here and also a bit of googling.

    For future browsers, the code I came up with is:

    $curryear = substr(tribe_get_displayed_month(), -4);
    $currmonth = substr(tribe_get_displayed_month(), -0, -4);
    echo $curryear;
    echo $currmonth;

    Plugin Author Rob La Gatta


    Greatly appreciate the follow-up here, j3ddesign, in case anyone else finds themselves in a similar position down the road. Cheers 🙂

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘[Plugin: The Events Calendar] Displaying Current month & year on Events Calendar’ is closed to new replies.