Home › Forums › Calendar Products › Events Calendar PRO › "untitled" event pages
- This topic has 7 replies, 2 voices, and was last updated 9 years, 9 months ago by Barry.
-
AuthorPosts
-
July 29, 2014 at 11:52 am #533847Tony AshParticipant
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 🙂
July 29, 2014 at 2:46 pm #534363BarryMemberHi – 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?
July 29, 2014 at 5:13 pm #534542Tony AshParticipantThis reply is private.
July 30, 2014 at 9:40 am #540433BarryMemberOdd. 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?
July 30, 2014 at 4:11 pm #542801Tony AshParticipantSorry, 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…July 30, 2014 at 4:40 pm #542956BarryMemberOK, 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?
July 30, 2014 at 5:35 pm #543318Tony AshParticipantThis reply is private.
July 31, 2014 at 1:19 pm #550185BarryMemberAh, 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?
-
AuthorPosts
- The topic ‘"untitled" event pages’ is closed to new replies.