Page Heading

Home Forums Calendar Products Events Calendar PRO Page Heading

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1237690
    Matthew
    Participant

    Hiya,

    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?

    #1239406
    Hunter
    Moderator

    Hello!

    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!

    #1239831
    Matthew
    Participant

    Thanks. 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.

    #1240468
    Hunter
    Moderator

    In your conditional, try using:

    tribe_is_event_query()

    Have a great weekend!

    #1252874
    Support Droid
    Keymaster

    Hey 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

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Page Heading’ is closed to new replies.