Home › Forums › Welcome! › Pre-Sales Questions › How to customize the title string in the calendar view
- This topic has 9 replies, 2 voices, and was last updated 6 years, 2 months ago by Support Droid.
-
AuthorPosts
-
January 16, 2018 at 5:52 am #1427450AlexanderGuest
Hi everyone!
I have a problem with altering the title string. I found lots of articles about that topic, but nothing helps :/
Here is one screenshot, what i would like to change: http://www.alexanderkoch.at/title.jpg
When i remove this line of code:
in /wp-content/plugins/the-events-calendar/src/views/list/content.php
nothing will change!The title is already there. Also when i copy that lines of code (bottom snippet) in my functions.php: https://theeventscalendar.com/knowledgebase/altering-or-removing-titles-on-calendar-views/
I also tryed it with an hardcoded statement
Nothing happend.
Hoping for you reply.
Best regards,
– AlexJanuary 16, 2018 at 5:57 am #1427455AlexanderGuest`
I have deleted.
Also tryed:
January 16, 2018 at 6:00 am #1427464AlexanderGuestSry it is not possible to paste code statements.
Screenshots of my Code.
First Statement i have deleted .. second hardcoded statement.
January 17, 2018 at 10:49 am #1428720SkyKeymasterHi Alexander,
The best way to edit the output of the title is to use the tribe_get_events_title filter.
Copy this code into your child theme’s functions.php: https://gist.github.com/skyshab/efa1ed98891dc64510c05ec0805ccda7
The top section contains strings that you would edit for the different calendar views. For example, if you want to edit the month view, change the value of
$title_month = 'My Events for %1$s';
to$title_month = 'My Custom Events for %1$s';
or whatever you would like. Repeat for each view you want to edit.Let me know if that helps.
Thanks,
SkyJanuary 17, 2018 at 11:11 pm #1429174AlexanderGuestHi Sky!
Thank you so much for your help it works. Additionally i have one question about how to change the headline “Events”. In my screenshot you can see exactly what i mean. (The word i would like to change is in german “Veranstaltungen” = English “Events”).
Screenshot: http://www.alexanderkoch.at/events.jpg
My Site: http://www.alexanderkoch.at/stocksport/eventsIs there a chance to do that?
Hoping again for your reply.
Thanks
regards,
AlexanderJanuary 18, 2018 at 11:43 am #1429781SkyKeymasterAlexander,
The title there is being added by your theme’s template. Are you wanting to change the actual name and slug of the page, including the URL? Or just the title?
In Events > Settings “General” tab, you can change the slug of the events page.
Or, in Events > Settings > “Display” tab, you choose a different template to use. You could create a custom page template from your theme that displays something different.
Thanks, and let me know if you have any other questions.
January 18, 2018 at 11:27 pm #1430230AlexanderGuestHi sky,
I only would like to change the title. Yes i see that i can change the url and the slug, but i can´t find a setting where i can change the name.
The design for now, how it looks like meets my expactations. So i don´t want to change it to a custom template. It´s only the title.
Is there no code statement which i can override the title string in my theme functions.php?
Link to my site: http://www.alexanderkoch.at/stocksport/termine/Thank you so much for talking and your help.
(I will be back on Monday ..)
Best regards,
AlexJanuary 19, 2018 at 9:53 am #1430767SkyKeymasterAlexander,
That depends on your theme. Unfortunately we are limited in the amount of support we can provide for customizations, particularly for the free version of the Events Calendar.
However, I will add, that creating a custom page template for your theme is pretty straightforward. All it entails is copying the template from your theme, adding the template metadata at the top, and just removing/replacing the part that is outputting the title.
http://www.wpbeginner.com/wp-themes/how-to-create-a-custom-page-in-wordpress/
Thanks, and have a good weekend.
SkyJanuary 21, 2018 at 9:47 pm #1432021AlexanderGuestHi Sky!
Thank you so much for your help!
Best regards,
AlexFebruary 12, 2018 at 8:36 am #1450783Support DroidKeymasterHey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.
Thanks so much!
The Events Calendar Support Team -
AuthorPosts
- The topic ‘How to customize the title string in the calendar view’ is closed to new replies.