Home › Forums › Calendar Products › Events Calendar PRO › Page Heading
- This topic has 5 replies, 4 voices, and was last updated 9 years, 2 months ago by
Matthew.
-
AuthorPosts
-
February 15, 2017 at 7:07 pm #1237690
Matthew
ParticipantHiya,
I’m having some trouble with getting a heading title to show on an events details page (the other views all seem to be working). At first I wanted to pull the event title up and remove the event title from where it is by default but at this point in this little war I’d be content with just adding “Events” to the title but even that doesn’t seem to work.
I’ve been making attempts based off of this: https://theeventscalendar.com/knowledgebase/calendar-page-shows-event-title/
I’ve tried the bit about adding the fix in the wp-config for fixing titles but no luck there. I’ve also tried copying the line from the single-event.php that shows the title but still it renders empty.
Basically the template has a heading section (see screenshot). It’s using
?php the_title(); ?>but it’s not pulling the title and all I’m left with is two empty h1 tags.Could you show me what to put in the template that pretty much says if this is an event details page, render
Events
otherwise carry on as normal?
February 16, 2017 at 6:59 pm #1239406Hunter
ModeratorHello!
First off, thank you for your purchase and welcome to our premium plugin support forums! I’d be happy to help further assist. If you haven’t already reviewed our Themer’s Guide, please take a moment and do so as it’s the most useful resource we have relating to creating and saving custom templates. The technical docs section of the website is also helpful in tracking down this kind of information.
Without digging too much on the subject, I opened up /the-events-calendar/src/views/month/content.php and on line 21 it uses the following code to display the ‘Events’ text you’re seeking:
Give that a shot and let me know how it works out and we’ll continue investigating should that be the case. I do want to point out that we’re limited on what we can cover on the support forums, but I’d be happy to help make sure this particular answer gets addressed. Please review our What support is provided for license holders? Knowledgebase article for more information on the matter.
Thanks again and have a great rest of your day. Cheers!
February 17, 2017 at 5:25 am #1239831Matthew
ParticipantThanks. I found that line before but forgot to mention it.
The problem I face with inserting that is on all of the other pages (non-calendar) it’s showing “Upcoming Events” along with the correct page heading.
What I’m trying to figure out is what if/else statement could be used. Such as
if(calendar-page) { echo <h1><?php tribe_events_title() ?></h1>; } else { echo <h1><?php the_title(); ?></h1> }I just can’t figure out what to put in the if(here) statement.
February 17, 2017 at 3:28 pm #1240468Hunter
ModeratorIn your conditional, try using:
tribe_is_event_query()Have a great weekend!
March 11, 2017 at 8:35 am #1252874Support Droid
KeymasterHey 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 ‘Page Heading’ is closed to new replies.
