Events title showing Untitled or event name

Home Forums Calendar Products Events Calendar PRO Events title showing Untitled or event name

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #939103
    Aimee Helton
    Participant

    We’ve tried just about everything we can find on the forms to fix our page title issue – including adding the Tribe line to the Config file and the various theme function code that’s been provided. But we’re still having issues.

    We have selected “Default Events Template” in the event settings. Without the theme function or config code, it shows an event title even on the main Events Calendar page. If we add the TRIBE_MODIFY_GLOBAL_TITLE line to the Config file, then all the event page titles display “(untitled).” When we tried these options – http://www.theeventscalendar.com/knowledgebase/calendar-page-shows-event-title – in the theme functions file, we still ended up with the name of an event displaying in the title – AND the event title would then disappear in the event listing.

    We’re stuck and not sure where to go from here. We’d greatly appreciate any assistance. We’re happy to send you access in a private message/email if needed.

    Thanks for your help!

    #939377
    Barry
    Member

    Hi Aimee,

    I’m sorry that none of those approaches worked for you – but thanks for persevering and giving them a try. The difficulty here is that themes (and plugins) have a great deal of power and all work in different ways, making each situation potentially unique.

    Perhaps the solution here is to customize the theme. The best way to do this will of course vary depending on how the theme has been put together: perhaps they have a suitable hook allowing this kind of change to be made cleanly, or perhaps creating a child theme and overriding the header.php template would be easiest.

    I think the first step is to figure that out and settle on whatever approach you are most comfortable with, but let’s assume you go for customizing the header.php template (assuming that is how the theme is structured).

    Somewhere within it, there is this sort of structure:

    <div id="container">
        <header id="header">
            <!-- ... we're not interested in this header -->
        </heaader>
        <header id="title=area">
            <div class="inner">
                <!-- here's the part we're interested in: -->
                <h2 class="entry-title"> ... </h2>
            </div>
        </header>
    ...

    If you can find whatever controls and sets h2.entry-title you can modify it! You probably want it to behave as normal in all situations except for event views, so let’s assume it takes this sort of form:

    <h2 class="entry-title">
        <?php echo custom_theme_title_function() ?>
    </h2>

    You could revise that to something along these lines:

    <h2 class="entry-title">
        <?php 
        // For non-single event views, display something suitable
        if ( !is_single() && ! is_singular() && tribe_is_event_query() ) {
            echo 'Custom calendar title';
        }
        // Otherwise, let the theme do its usual thing
        else {
            echo custom_theme_title_function() 
        }
        ?>
    </h2>

    That is a simplified example that probably will need some tweaking rather than being something you can just drop in place, but I hope it gives you an angle to explore here.

    Good luck!

    #943014
    Barry
    Member

    Hi! It’s been a while so I’m going to go ahead and close this thread. If we can help with anything else, though, please don’t hesitate to create new threads as needed. Thanks!

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Events title showing Untitled or event name’ is closed to new replies.