Home › Forums › Calendar Products › Events Calendar PRO › First Event title shows instead of wanted Page Title
- This topic has 14 replies, 2 voices, and was last updated 12 years, 10 months ago by
Barry.
-
AuthorPosts
-
June 5, 2013 at 1:27 am #50562
Stephanie
ParticipantHi at Tribe,
i have been fiddling around for days now but even with trying all the suggested solutions everywhere I just can not get anywhere near a solution. I only use the list view for the calendar.On my events page the title of the page always shows the most current event as page title.
http://snippi.com/s/9aeytx3But I guess the solution lies somewhere here:
http://snippi.com/s/gh6b8s3
I probably need another “if event list show page title” business?Or maybe here?:
Then there is an extra page-title-php with the following lines:
http://snippi.com/s/keyu5vtWould be great if you could help
Thanks Steph
June 5, 2013 at 2:02 pm #50629Barry
MemberIt’s difficult to say from those snippets alone and it could indeed result from activity happening upstream of those (ie, within a filter call).
When you opened the thread you noted that you had tried deactivating other plugins and switching to a default theme. Did you experience the same thing at that point or, if not, were you able to isolate this to a specific component (such as your theme)?
Thanks!
June 6, 2013 at 12:32 am #50669Stephanie
ParticipantHi Barry,
yes I know it relates to the way the page title is build in this theme. I had this problem with another theme as well where there is the pagetitle settled in a wide coloured banner as well.
The standard theme works just fine.
It would be great if you could have a look. Am happy to provide you with all needed data.
thanks StephanieJune 6, 2013 at 5:54 am #50678Barry
MemberSure, well if you could either email a .zip of the theme to us, or provide a download link, we can take a quick look (though I can’t make any promises about fixing it, I might be able to offer a suggestion).
June 6, 2013 at 5:55 am #50679Barry
MemberThis reply is private.
June 11, 2013 at 8:06 am #51037Barry
MemberThanks!
So here are a few changes you can make that should at least get you to a better starting position. Before you proceed though, please read and familiarize yourself with:
– Our themer’s guide
– This tutorial on template overridesArmed with everything you have gleaned from the above resources, please then try the following steps:
1. Visit Events > Settings > Template and change the Events Template setting to Default Events Template.
2. Copy and override ecp-page-template.php per the instructions in our themer’s guide and the template overrides tutorial.
3. Change your copy of ecp-page-template.php so it looks like this.
4. Also edit your theme’s stylesheet and add these rules to the bottom.
Does that help?
June 12, 2013 at 12:46 am #51127Stephanie
ParticipantHi Barry,
hooray, that worked great! Needed to add a filter in the functions on top though:
add_filter(‘tribe_get_events_title’, ‘my_get_events_title’);
function my_get_events_title($title) {
if( tribe_is_month() && !is_tax() ) { // The Main Calendar Page
return ‘Seminare, Vorträge & Workshops’;
} elseif( tribe_is_month() && is_tax() ) { // Calendar Category Pages
return ‘Seminare, Vorträge & Workshops’ . ‘ » ‘ . single_term_title(”, false);
} elseif( tribe_is_event() && !tribe_is_day() && !is_single() ) { // The Main Events List
return ‘Veranstaltung’;
} elseif( tribe_is_event() && is_single() ) { // Single Events
return get_the_title();
} elseif( tribe_is_day() ) { // Single Event Days
return ‘Veranstaltung am’ . date(‘F j, Y’, strtotime($wp_query->query_vars[‘eventDate’]));
} elseif( tribe_is_venue() ) { // Single Venues
return $title;
} else {
return $title;
}
}Only tiny Problem is the subtitle on the page which i tried to implement with the line:
as in the original includes page-title.php file. No results.
Could you have another look?
Thanks a lot
Steph
June 12, 2013 at 5:19 am #51135Barry
MemberThe forum doesn’t deal with code too well so I think I’m missing some of what you posted (re the problem with the subtitle) … can you share your code via a service like Pastebin or Gist?
Thanks!
June 12, 2013 at 5:46 am #51138Stephanie
ParticipantHi Barry,
sure:
http://pastebin.com/Ka6g6u2K
This is in the includes/page-title.php i think this is where the subtitle is settled
thanks StephJune 12, 2013 at 6:09 am #51142Barry
MemberOK, thanks – I’m not quite clear about the actual problem, though. Can you describe what you want to happen and what actually is happening (if you could share an example from your own site that would be awesome 🙂 )?
June 13, 2013 at 9:01 pm #51306Barry
MemberCan you confirm what the problem is as you see it (with the subtitles) and what the desirable behaviour is?
I’m also unfamiliar with German which makes it difficult for me to navigate to the events pages … if you could point me in the direction of the relevant URL that would be great (you can use our private reply feature to post it if you prefer).
Thanks!
June 14, 2013 at 1:24 am #51315Stephanie
ParticipantThis reply is private.
June 14, 2013 at 5:50 am #51327Barry
MemberOK – thanks for your patience.
So if I understand correctly you want event pages to also have a search box and potentially to have a subtitle, too.
Following from my earlier post, can you change your custom ecp-page-template.php to this?
June 14, 2013 at 6:09 am #51335Stephanie
ParticipantBarry, you are a star!
It works like a charme!
thank you so much!Steph
June 14, 2013 at 6:22 am #51339Barry
MemberMy pleasure – and sorry for the delay while we worked toward the solution 🙂
-
AuthorPosts
- The topic ‘First Event title shows instead of wanted Page Title’ is closed to new replies.
