Home › Forums › Calendar Products › Events Calendar PRO › the_title header in list view
- This topic has 3 replies, 2 voices, and was last updated 5 years, 11 months ago by Aaron Simms.
-
AuthorPosts
-
April 25, 2018 at 9:03 pm #1516480Aaron SimmsParticipant
I’m using a pretty basic WordPress template for the Events page template and it contains the usual <header class=”entry-header”> field that WordPress usually fills with the_title, but that is not being populated at all by the Events Calendar in list view and I cannot see any reference to the_title in the various list templates (content, loop etc.). Can you give me any suggestions how to get a page title to show up on the list view? I currently have it hardcoded in the page template but then that same page title would also show up on every calendar-related page when I only actually want it on the default list view page.
April 26, 2018 at 8:40 pm #1517502JenniferKeymasterHi Aaron,
If you have “Default Events Template” selected under Events > Settings > Display > Events Template, then the template for all of the views is default-template.php, found in wp-content/plugins/the-events-calendar/src/views. This template pulls in the templates for each view…for list view, in the content.php file (in views/list), you’ll see tribe_get_events_title, which is where the title comes from. If you want to use a custom title, this would be the template to customize – our themer’s guide has instructions on doing template overrides.
If you have any questions or if I’ve misunderstood what you’re looking for here, please let me know!
Thanks,
Jennifer
April 27, 2018 at 8:26 pm #1518309Aaron SimmsParticipantI currently use a custom page template, not the default event template. The problem is not getting the event titles for a list view, it’s including a page title for the “events archive” list view — so above the list of events is a title for that page and only for that page — it shouldn’t show up for single events, venue, organizer etc. pages.
Since all those different events-related pages use the same template, however, hardcoding a page title is not an option, so I guess I need some function that determines if it’s the archive page and, if it is, to return a specific page title and if it’s not then return the normal single event/venue etc title.
- This reply was modified 5 years, 12 months ago by Aaron Simms.
May 4, 2018 at 5:41 am #1522810JenniferKeymasterHi Aaron,
Thanks for clarifying…you can try the is_archive function, and we have a full list of functions that our plugins offer here. The tribe_get_events_title function does get the page title (not the event titles), and within that function, there are checks to determine which type of page you’re on and display a title accordingly. You can take a look at this in wp-content/plugins/the-events-calendar/src/functions/template-tags/loop.php. While we never recommend making changes directly in the plugin files (as these will be erased next time you update the plugin), you can use the tribe_get_events_title filter to customize the output for certain views.
We are limited in the amount of support that we can provide for customizations, but if you have any other questions, please let me know – I’ll be happy to point you in the right direction!
Thanks,
Jennifer
May 26, 2018 at 9:35 am #1539446Support 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 ‘the_title header in list view’ is closed to new replies.