Calendar page title shows title of an event and won't change

Home Forums Calendar Products Events Calendar PRO Calendar page title shows title of an event and won't change

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #19260
    shawn
    Member

    Some how event PRO 2.0.6 has grabbed one of my event titles and made it the Calendar Heading when viewing either by calendar or events??
    It has done this in the previous version as well.
    Here is the link to show you:

    http://www.myamerishield.com/educational-seminars/

    How do I give my page a heading that is static and never changes?
    I’ve tried the following to no avail:
    * It could be a permalinks-related issue. Resave your permalinks page to reset them.
    * Make sure you’re running the latest version of the plugin (2.0.6) for both free & PRO — these need to be in sync or it won’t function properly.
    * Check that there aren’t any earlier versions of The Events Calendar or Events Calendar PRO active anywhere on the site. If they’re present, deactivate them.
    * Make sure you’re running the latest version of WordPress.
    * Try to identify whether this is a conflict with another plugin. You can do so easily by deactivating any other plugins you’ve got active and checking whether the issue persists.
    * If it isn’t a plugin conflict, it may be a theme one. If after deactivating all other plugins the issue persists, please revert to the default 2011 theme and test whether it’s an issue there.

    Thanks for your assistance.
    Shawn

    #19270
    Jonah
    Participant

    Hi Shawn,

    First find out what you are using for your Events Template in Settings > The Events Calendar > Template. Then, you are going to need to find where your theme is executing the_title() – this could be in header.php, page.php or /wp-content/plugins/the-events-calendar/views/ecp-page-template.php or it could also be being set through a theme specific dynamic post header function… It’s impossible to say without looking at your code. Depending on what you’ve got set for the Events Template will determine whether you should look at page.php or ecp-page-template.php – if you’ve got the Default Events Template selected, then it’s ecp-page-template.php – if you’ve got the Default Page Template selected, then it’s page.php. It could also be another page template within your theme. This will help you narrow down where to look for the_title()

    Once you’ve found where the_title() is executed, you’ll want to use these conditional wrappers: https://gist.github.com/2415009 – to help you conditionally set the title for any of the event related pages (look at the comments in the wrapper code). Basically you’re going to want to hard code the title for the calendar (gridview) page like so:

    if( tribe_is_month() && !is_tax() ) { // The Main Calendar Page
    echo 'Events Calendar';
    } elseif( tribe_is_month() && is_tax() ) { // Calendar Category Pages
    echo 'Events Calendar';
    } elseif( tribe_is_event() && !tribe_is_day() && !is_single() ) { // The Main Events List
    echo 'Events List';
    } elseif( tribe_is_event() && is_single() ) { // Single Events
    echo get_the_title();
    } elseif( tribe_is_day() ) { // Single Event Days
    echo get_the_title();
    } elseif( tribe_is_venue() ) { // Single Venues
    echo get_the_title();
    } else {
    echo get_the_title();
    }

    Pay attention to any specific code your theme may be using for the title too because you may want to wrap items in HTML and the like.

    I hope that helps, sorry for the complicated answer but unfortunately there is no easy answer. This is how it needs to be done. Let me know whether or not that helps.

    Cheers,
    Jonah

    #20630
    shawn
    Member

    HAH! I figured it out…..somehow the default template “default page template” was chosen…when this happens it apparently grabs a random page tile of an event and places that on the main calender page….
    However, if you choose the “default events template” it uses the heading of “Calender of Events” on the calender page!!!!
    Whooopee! Consider this a closed problem and not a bug….just a lesson learned.
    Shawn

    #20637
    Jonah
    Participant

    Hey Shawn,

    Glad to hear you figured it out, let us know if there’s anything else we can help with.

    Cheers,
    Jonah

    #977081
    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 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Calendar page title shows title of an event and won't change’ is closed to new replies.