Home › Forums › Calendar Products › Events Calendar PRO › Upcoming Events (title): fully change – How?
- This topic has 5 replies, 2 voices, and was last updated 11 years, 6 months ago by
Brook.
-
AuthorPosts
-
September 22, 2014 at 5:27 pm #759889
phatwp
ParticipantThe link to the tutorial,
https://theeventscalendar.com/altering-or-removing-headings-on-calendar-views/
only yields a partial fix of List Title:
<!– List Title –><h2 class=”tribe-events-page-title”>
How to change actual title:
<!– page title, displayed in your browser bar –>
<title>Upcoming Events </title>September 23, 2014 at 8:44 am #761815Brook
ParticipantHowdy phatwp,
Good question. This snippet allow you to change the <title> for any page. You can delete and of the (else)if blocks that you do not want to change. Paste it at the top of your theme’s functions.php file, underneath the first line “<?php”. If your theme does not have a functions.php file, go to your theme folder, create a new text document file called “functions.php”, and paste this text in the first line of the file “<?php”. On line 2 or 3, paste that snippet.
Does that make sense? Will that work for you? Please let me know. Cheers!
– Brook
September 23, 2014 at 1:37 pm #762342phatwp
Participantmakes no sense at all
what snippet are you speaking to?
I have successfully changed the page heading displayed to the user that is/was “upcoming events”
the problem is how to change the page title <title> from the upcoming events page ( for seo and google search it is worthless to display something as simplistic as “upcoming events” to a user or a bot in a search )
September 24, 2014 at 11:45 pm #765462Brook
ParticipantHah! Well I guess it would not make sense when I forgot to include a link to the snippet. Sorry about that. Here is the link I was referring to, it shows you hot to change the <title> element for every page in the Events Calendar: http://pastebin.com/QU2aMwBJ
Does that do what you want?
– Brook
September 26, 2014 at 10:27 am #768739phatwp
ParticipantI can see clearly now that the rain has gone.
Since I am yoasting I did:
// Runs the <title> element through our custom filter
// add_filter(‘wp_title’, ‘filter_events_title’);
// If you are using Yoast delete the above line and uncomment the following one
add_filter(‘wpseo_title’, ‘filter_events_title’);
// Tribe events: Manually set title Upcoming Events
function filter_events_title ($title) {
if ( tribe_is_upcoming() && !is_tax() ) { // List View Page: Upcoming Events
$title = ‘Change this to something meaningful for SEO’;
}
return $title;
}September 30, 2014 at 2:09 pm #779126Brook
ParticipantAwesome! Thanks for sharing your solution.
– Brook
-
AuthorPosts
- The topic ‘Upcoming Events (title): fully change – How?’ is closed to new replies.
