"untitled" event pages

Home Forums Calendar Products Events Calendar PRO "untitled" event pages

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #533847
    Tony Ash
    Participant

    I’m using my theme’s (https://wordpress.org/themes/tesla) default page template to display events on my site. These pages have an “untitled” page title.
    I did some research:
    https://theeventscalendar.com/faqs/the-calendar-page-title-shows-title-of-an-event/
    https://gist.github.com/jo-snips/2415009
    I used the gist (https://gist.github.com/jo-snips/2415009) and it corrected most all of the issues with the “Untitled” page title however there are still many types of event views where it didn’t work and Untitled is still being displayed.
    The posts and the gist I referenced were from 2012 or 2013 and it seems some of the Events Calendar framework has changed since then.
    Here is a list of pages I’m still seeing Untitled on:
    * Single Events
    * Single Venues
    * Single Organizers
    Any ideas on how to correct? Perhaps someone can reference the gist and detail what needs to be changed for this to work with v3.7?

    Thanks in advance 🙂

    #534363
    Barry
    Member

    Hi – sorry you’re experiencing difficulties.

    The logic in Jonah’s snippet for detecting the three single post views you detailed ought to do the trick, ie:

    	if ( tribe_is_event() && is_single() ) { // Single Events
    		echo 'were on a single event page';
    	} elseif ( tribe_is_venue() ) { // Single Venues
    		echo 'were on a single venue page';
    	} elseif ( get_post_type() == 'tribe_organizer' && is_single() ) { // Single Organizers
    		echo 'were on a single organizer page';
    	}

    Possibly though something else is getting in the way. Can you share – via Pastebin, Gist or some similar service – the actual code you have in place, within the context of the relevant template?

    #534542
    Tony Ash
    Participant

    This reply is private.

    #540433
    Barry
    Member

    Odd. Does this only happen with your particular theme? For instance if – as a quick experiment – you switch to Twenty Thirteen and set up something similar, do you find it works then?

    #542801
    Tony Ash
    Participant

    Sorry, I thought I made this clear by explaining how I’m trying to use the gist provided to resolve the problem. (https://gist.github.com/jo-snips/2415009)
    To be specific, the problem is happening on the Tesla theme but not on 2013…

    #542956
    Barry
    Member

    OK, sorry if I misunderstood.

    I downloaded a copy of Tesla and switched to using the Default Page Template and couldn’t immediately see a problem here though – without any snippets whatsoever I see nice and presentable titles.

    Could any other customizations (or even plugins) be impacting?

    #543318
    Tony Ash
    Participant

    This reply is private.

    #550185
    Barry
    Member

    Ah, ok. Thanks for highlighting it.

    So I see some code in the theme’s page.php template looking like this:

    <div class="titleContainer font1 titlePage<?php if (!is_active_sidebar($sidebar_choice)) echo ' titleBordered'; ?>">
        <div class="title">
            <?php the_title(); ?>
        </div>
    </div>

    Unfortunately something is getting caught up with some of our own logic used to deliver event pages via the Default Page Template. Changing the above to something like this (I’m only illustrating the three problem cases here but it should give the general idea) seems to work:

    <div class="titleContainer font1 titlePage<?php if (!is_active_sidebar($sidebar_choice)) echo ' titleBordered'; ?>">
        <div class="title">
    		<?php
    		$event_post = 2 === count( $wp_query->posts ) ? $wp_query->posts[0] : false;
    		$event_id = $event_post->ID;
    
    		if ( $event_id && tribe_is_event( $event_id ) && is_single() )
    			echo 'Single event!';
    
    		elseif ( $event_id && tribe_is_venue( $event_id ) && is_single() )
    			echo 'Single venue!';
    
    		elseif ( $event_id && tribe_is_organizer( $event_id ) && is_single() )
    			echo 'Single organizer!';
    
    		else the_title();
    		?>
        </div>
    </div>

    Can you give that a blast and see if it helps?

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘"untitled" event pages’ is closed to new replies.