Home › Forums › Calendar Products › Events Calendar PRO › Editing Page titles when using wordpress seo plugin
- This topic has 9 replies, 4 voices, and was last updated 8 years, 9 months ago by Support Droid.
-
AuthorPosts
-
July 25, 2012 at 4:43 am #22713RichardParticipant
Hi,
I believe there were some filters going to be added to version 2.0.8 to allow more flexibility with editing the page titles with the events calendar? Was this implemented?
I need to update the page title for the main calendar page as soon as possible for an SEO campaign that is in motion this month.
I am using a Genesis child theme and tried to add the mods to my functions.php file as per your very detailed videos but the page title does not update to my new setting?
e.g.
/*——————————————————————————-
Modify Titles
——————————————————————————-*/
add_filter(‘genesis_post_title_text’, ‘custom_do_post_title’);
function custom_do_post_title() {global $wp_query;
$title = get_the_title();if ( strlen( $title ) == 0 )
return;if( tribe_is_month() && !is_tax() ) { // The Main Calendar Page
$title = ‘I put my new p[age title here but no change’;Many thanks.
July 25, 2012 at 8:17 am #22730RobMemberHey Richard. Thanks for reaching out; yes, 2.0.8 should have shipped with this tweak…basically we added filters to the various title generators within the TribeEvents->maybeAddEventTitle method. We added a filter to the title so that users can fix the title in their functions.php file using the filter. The reason for this is that the theme’s header.php file is what determines the format for the title.
Does that help? If you’re using Genesis, have you already checked out Jonah’s Genesis-centric integration guide? It may be useful and can be found here: https://theeventscalendar.com/tutorial-integrating-the-events-calendar-w-genesis/. If you have further questions on the title tag aspect beyond the link + what I’ve provided above, let me know and I can elaborate. Cheers!
July 25, 2012 at 5:28 pm #22755RichardParticipantHey Rob,
Thanks for the reply. I did modify the functions.php file for the ‘Modify Titles’ section of code, taken directly from the download on the video tutorial page you linked to. I watched it again this morning but it looks like this code is to modify the headline on the page, not the SEO title that appears on the tab of the web browser and is displayed in the Google search results. Is that correct?
Maybe I should just clarify here:
I am using Yoasts wordpress seo plugin
The individual events pages are working fine i.e. I can write in the SEO title field from WordPress SEO and it modifies the SEO title (as seen in the tab of the browser) of that event as required.
The one I want to modify is the SEO title of the page where the events calender is embedded (this page). Currently it is showing ‘Events for July, 2012’ regardless of what I try (WordPress SEO plugin activated or deactivated) etc
I am happy to hard code it somewhere provided I know where to do it so that it is not affected by a plugin update.
Hopefully that makes a bit more sense on what I am trying to do!
Many thanks for the support.July 25, 2012 at 5:46 pm #22756RichardParticipantOops, looks like html is not supported in the forum here?
This is the page where the calender sits: http://www.gnosticcorner.com.au/whats-on/July 25, 2012 at 6:11 pm #22766RobMemberThat makes perfect sense, Richard. Thanks for confirming – this is a bit outside my area of expertise but let me get our lead dev Paul, who handles all the maintenance work on this plugin, to take a look when he hits the forums tomorrow. He should be able to help point you in the right direction on this.
Stay tuned and thanks for your patience so far. Please let me know what else I can do in the interim.
August 1, 2012 at 12:14 pm #23056Daniel DvorkinMemberHowdy Richard,
Exactly as Rob said, the function TribeEvents->maybeAddEventTitle defines the logic for setting up the HTML title (or SEO title as you called it). That function is in wp-content/plugins/the-events-calendar/lib/the-events-calendar.class.php line ~635 (depending on the version you’re using) but I’ve gisted it for you so you can check it easily: https://gist.github.com/3229799
In that function you can see all the different filters you can hook to, depending on the page you’re trying to modify. The one you’re asking for right now is tribe_month_grid_view_title.
Add this to your theme’s function.php to see it in action: https://gist.github.com/3229874
Please do let me know if this solves your issue.
Cheers!
August 8, 2012 at 7:43 am #23428RobMemberHey Richard. Just wanted to follow-up on Daniel’s last post, to see if it made sense or if you had any other questions here? Please let me know if you need anything, or if we can close out the thread. Cheers!
August 10, 2012 at 1:55 pm #23534RichardParticipant@Daniel, @Rob – haven’t checked back in until today. This is awesome! I have been able to make the changes with your help so thank you very much.
This is great support!August 14, 2012 at 2:48 pm #23646RobMemberFantastic to hear, Richard – thanks for confirming as much. Glad to be of service; it sounds like you’re set here, but if you need anything else in the future please don’t hesitate to let us know. We appreciate your support and are always happy to help when we can.
July 7, 2015 at 6:25 am #977542Support DroidKeymasterThis topic has not been active for quite some time and will now be closed.
If you still need assistance please simply open a new topic (linking to this one if necessary)
and one of the team will be only too happy to help. -
AuthorPosts
- The topic ‘Editing Page titles when using wordpress seo plugin’ is closed to new replies.