Home › Forums › Calendar Products › Events Calendar PRO › Output current month text in calendar month view
- This topic has 6 replies, 3 voices, and was last updated 9 years, 1 month ago by
Hunter.
-
AuthorPosts
-
March 15, 2017 at 9:38 am #1254600
Simone
ParticipantHi,
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!
SimoneMarch 15, 2017 at 10:03 pm #1254885Hunter
ModeratorHi 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!
March 16, 2017 at 1:49 am #1254949Simone
ParticipantHi 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!
CheersMarch 17, 2017 at 2:59 pm #1256098Hunter
ModeratorHi 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 🙂
March 17, 2017 at 3:19 pm #1256107Simone
ParticipantHi again,
this line of code is exactly what I needed to solve my issue!
Thanks so much for your help,
Cheers 😉March 20, 2017 at 10:17 am #1256773Hunter
ModeratorPerfect! 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!
-
AuthorPosts
- The topic ‘Output current month text in calendar month view’ is closed to new replies.
