Editing Page titles when using wordpress seo plugin
  • Stranger
    Posts: 3
    Topics: 1
    Richard July 25, 2012

    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.

  • Gatekeeper
    Posts: 4206
    Topics: 81
    Answers: 467
    Rob July 25, 2012

    Hey 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: http://tri.be/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!

  • Stranger
    Posts: 3
    Topics: 1
    Richard July 25, 2012

    Hey 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.

  • Stranger
    Posts: 3
    Topics: 1
    Richard July 25, 2012

    Oops, 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/

  • Gatekeeper
    Posts: 4206
    Topics: 81
    Answers: 467
    Rob July 25, 2012

    That 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.

  • Modern Tribe Dev Team
    Posts: 43

    Answers: 12
    Daniel Dvorkin August 1, 2012
    Answered ✔

    Howdy 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!

  • Gatekeeper
    Posts: 4206
    Topics: 81
    Answers: 467
    Rob August 8, 2012

    Hey 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!

  • Stranger
    Posts: 3
    Topics: 1
    Richard August 10, 2012

    @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!

  • Gatekeeper
    Posts: 4206
    Topics: 81
    Answers: 467
    Rob August 14, 2012

    Fantastic 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.

  • Viewing 9 posts - 1 through 9 (of 9 total)