Output current month text in calendar month view

Home Forums Calendar Products Events Calendar PRO Output current month text in calendar month view

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1254600
    Simone
    Participant

    Hi,
    I’m here again with another question 🙂
    I’d like to output the month just above events calendar, right now in the link you can see I output the current month but if I change the displayed month (clicking previous month just under the calendar), of course the month remains MARZO (MARCH) 2017.
    For that change I added this line in /month/loop-grid.php

    <?php echo utf8_encode( strftime(“%B %Y”) ); ?> – output current month instead

    just before the start of the table displaying the weekdays names.
    What code should I use to get the current displayed month?
    Thanks for your help!
    Simone

    #1254885
    Hunter
    Moderator

    Hi again 🙂

    I found a relatively old thread which has a solution posted, so please take a moment and review it to see if it is still in working order. If not, we can explore some other options. Thanks and have a great rest of your day. Cheers!

    #1254949
    Simone
    Participant

    Hi Hunter,
    sorry my knowledge in PHP is very limited so I wasn’t able to solve that following the older post because:
    1 – I didn’t find the “calendar.php” function files, so I tried to include that directly in “loop-grid.php”
    2 – The line that actually outputs the current month&year isn’t posted because the user couldn’t post php code in the thread..
    So please could you help me out to find the solution?
    Thanks in advance!
    Cheers

    #1256098
    Hunter
    Moderator

    Hi and welcome back,

    We’re unfortunately fairly limited with customizations as outlined in our What support is provided for license holders? Knowledgebase article.

    I recommend familiarizing yourself with the process of creating and saving customizations. It seems difficult at first, but a little practice goes a long way. Our Themer’s Guide is the best documentation we have on the matter. I also like to share this Customizing WordPress #1 – How To Create A Child Theme by LevelUpTuts YouTube video. It’s essentially the same process as the Themer’s Guide.

    I believe the following line of code should accomplish what you need, so give it a shot and let me know how things work out:

    echo date_i18n( 'F', strtotime( tribe_get_month_view_date() ) );

    Sorry again I can’t be more help in this scenario and keep me posted with your progress. Have a great weekend! Cheers 🙂

    #1256107
    Simone
    Participant

    Hi again,
    this line of code is exactly what I needed to solve my issue!
    Thanks so much for your help,
    Cheers 😉

    #1256773
    Hunter
    Moderator

    Perfect! I’m happy to hear we could help out. Feel free to create a new thread if you have any more questions or comments. Have an excellent week!

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Output current month text in calendar month view’ is closed to new replies.