Control "title" tags in wp_head for tribe events

Home Forums Calendar Products Events Calendar PRO Control "title" tags in wp_head for tribe events

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #63545
    evossman
    Participant

    I want to control the “title” tag in the “head” section and haven’t been able to figure out a good way to do it. I’m using a genesis theme (news) and tried using a few SEO plugins to no avail (Yoast, Ultimate, etc). I also tried a filter in the functions file on wp_head and then using the “tribe_is….” functions to create and if/else statement as shown https://gist.github.com/jo-snips/2415009/raw/87d950358ae745d3b4bac6158fc6ef047e50aa35/events-conditional-wrappers.php

    That works, but filters all other pages incorrectly. Meaning that now the homepage reads the same as the “tribe_is_month” and the category and tag pages read according to some other combination in the conditional. I also tried adding in “is_home”, is_category, is_tag, etc to overide, but that wouldn’t work because depending on where it is in the elseif order, one overrides the other and i’ll have mixedup tags. I read somewhere that because of when the tribe plugin is called some of those conditional wrappers would work and some wouldn’t.

    I’m assuming since this is such a common thing that I’m missing something.

    Any help is greatly appreciated.

    #63752
    evossman
    Participant

    Okay, it seems like the solution is similar to my troubles with genesis and full-width. You need to detect the post type prior to making any changes. Prior to the if conditional logic above I put if(get_post_type() == ‘tribe_events’ || get_post_type() == ‘tribe_venue’ || get_post_type() == ‘tribe_organizer’){

    I tried this with Yoast SEO which didn’t work but SEO Ultimate lets you disable the title rewrites. All was well. I’m sure yoast seo has a hook or filter or something to turn it off or to filter and you can do the same thing as described above. Full code here https://gist.github.com/evossman/6385046

    #64283
    Rob
    Member

    Thanks for your follow-up, evossman, and for confirming that you were able to get yourself sorted here. Am I correct in assuming that you don’t need anything more (and that the thread can be closed as a result)? Let me know!

    #65817
    evossman
    Participant

    Rob, that is correct.
    Cheers

    #66711
    Barry
    Member

    Thanks evossman!

    #980859
    Support Droid
    Keymaster

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

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Control "title" tags in wp_head for tribe events’ is closed to new replies.