Title: Title conflicts
Last modified: January 31, 2023

---

# Title conflicts

 *  Resolved [mikehermary](https://wordpress.org/support/users/mikehermary/)
 * (@mikehermary)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/title-conflicts/)
 * Hello,
 * I am using the filter function found [here](https://theeventscalendar.com/knowledgebase/k/calendar-page-shows-event-title/)
   to override the display of the first event title for all TEC views, but it is
   not working. This code has been added to my custom theme’s functions.php file.
 * I am using the following function in my theme’s template-tags.php file to display
   a background image with the the_title displayed over top on all of the calendar
   views.
 *     ```wp-block-code
       if ( ! function_exists( 'flagstaffcounty_event_thumbnail' ) ) :
         /**
          * Displays an optional post thumbnail.
          *
          * Wraps the post thumbnail in a figure element when on event views.
          */
         function flagstaffcounty_event_thumbnail() {
           $url = site_url();
   
           : ?>
             <figure class="page-thumbnail" style="background-image: url(<?php echo $url; ?>/wp-content/uploads/2022/01/generic-page-title-banner.jpg);" itemprop="image" itemscope="" itemtype="http://schema.org/ImageObject">
               <header class="entry-header">
                 <?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
               </header><!-- .entry-header -->
             </figure>
           <?php
           endif;
         }
       endif;
       ```
   
 * Would there be a conflict between this code and the TEC title override function?
   None of my other pages that display core posts or pages, or Toolset CPT items
   are encountering issues with this function.
 * Cheers,

Viewing 15 replies - 1 through 15 (of 15 total)

 *  Plugin Support [Darian](https://wordpress.org/support/users/d0153/)
 * (@d0153)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/title-conflicts/#post-16429158)
 * Hi [@mikehermary](https://wordpress.org/support/users/mikehermary/)
 * Thanks for reaching out. I think the filter found on this [page](https://theeventscalendar.com/knowledgebase/k/calendar-page-shows-event-title/),
   is for the <title> tag of the page. Please look for `the_title()` or `get_the_title()`
   from your theme and replace it with the [Conditional Wrappers for Event View](https://gist.github.com/theeventscalendar/8b88307bb2c082d6cdba).
 * Like what is shown on the last snippet code on this [page](https://theeventscalendar.com/knowledgebase/k/calendar-page-shows-event-title/).
 * I hope this helps, and please let me know if you have further concerns.
 *  Thread Starter [mikehermary](https://wordpress.org/support/users/mikehermary/)
 * (@mikehermary)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/title-conflicts/#post-16431185)
 * Hello,
 * I have followed those steps, but now the opposite is occurring. The text “Events
   Calendar” is displaying on all of the pages, even for single events.
 * I have included my updated template tags function code below for reference. The
   duplicate function has been removed from the main functions.php file.
 *     ```wp-block-code
       if ( ! function_exists( 'flagstaffcounty_event_thumbnail' ) ) :
         /**
          * Displays an optional post thumbnail.
          *
          * Wraps the post thumbnail in a figure element when on event views.
          */
         function flagstaffcounty_event_thumbnail() {
           $url = site_url(); ?>
             <figure class="page-thumbnail" style="background-image: url(<?php echo $url; ?>/wp-content/uploads/2022/01/generic-page-title-banner.jpg);" itemprop="image" itemscope="" itemtype="http://schema.org/ImageObject">
               <header class="entry-header">
                 <?php
                 if( tribe_is_month() && !is_tax() ) { // The Main Calendar Page ?>
                   <h1 class="entry-title">
                     <?php esc_html_e( "Events Calendar", "flagstaffcounty" ); ?>
                   </h1>
                 <?php } elseif( tribe_is_month() && is_tax() ) { // Calendar Category Pages ?>
                   <h1 class="entry-title">
                     <?php esc_html_e( "Events Calendar", "flagstaffcounty" )  . ' &raquo; ' . single_term_title('', false); ?>
                   </h1>
                 <?php } elseif( tribe_is_event() && !tribe_is_day() && !is_single() ) { // The Main Events List ?>
                   <h1 class="entry-title">
                     <?php esc_html_e( "Events List", "flagstaffcounty" ); ?>
                   </h1>
                 <?php } elseif( tribe_is_event() && is_single() ) { // Single Events
                   echo the_title();
                 } elseif( tribe_is_day() ) { // Single Event Days
                   echo '<h1 class="entry-title">Events on: ' . date('F j, Y', strtotime($wp_query->query_vars['eventDate'])) . '</h1>';
                 } elseif( tribe_is_venue() ) { // Single Venues ?>
                   <?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
                 <?php } else { ?>
                   <?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
                 <?php }
                 ?>
               </header><!-- .entry-header -->
             </figure>
           <?php
         }
       endif;
       ```
   
 *  Plugin Support [Darian](https://wordpress.org/support/users/d0153/)
 * (@d0153)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/title-conflicts/#post-16445207)
 * Hi [@mikehermary](https://wordpress.org/support/users/mikehermary/)
 * Does the issue persist if you only activate our plugins and use a basic theme(
   2020 WP theme)? I suggest conducting these tests on a [Staging Server](https://theeventscalendar.com/knowledgebase/k/creating-and-using-a-wordpress-staging-site).
 * Could you provide the version of the following? This will help me understand 
   how your system is set up.
    - PHP
    - WordPress
    - The Events Calendar
    - Theme
 *  Thread Starter [mikehermary](https://wordpress.org/support/users/mikehermary/)
 * (@mikehermary)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/title-conflicts/#post-16450312)
 * Hello,
 * I have setup a staging server, and tested with the WP 2020 theme. It looks like
   the 2020 theme does not support the display of the page titles.
 * Here are the setup details:
    - PHP 8.0
    - WordPress 6.1.1
    - The Events Calendar 6.0.8
    - Custom theme
 * Cheers,
 *  Plugin Support [Darian](https://wordpress.org/support/users/d0153/)
 * (@d0153)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/title-conflicts/#post-16459972)
 * Hi [@mikehermary](https://wordpress.org/support/users/mikehermary/)
 * Could you try replacing `tribe_is_month()` with `tribe_context()->get( 'view_request')
   === 'month'` and check if that helps.
 *  Thread Starter [mikehermary](https://wordpress.org/support/users/mikehermary/)
 * (@mikehermary)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/title-conflicts/#post-16460529)
 * Hello,
 * No luck with those code adjustments. The monthly view is now displaying Event
   List as the heading and the individual events are not using the `the_title( '
   <h1 class="entry-title">', '</h1>' );` code.
 * Cheers,
 *  Thread Starter [mikehermary](https://wordpress.org/support/users/mikehermary/)
 * (@mikehermary)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/title-conflicts/#post-16469995)
 * Hello,
 * Further to the title text issue, the date displayed on individual day listings
   is incorrect.
 * For example, the URL is displayed [https://domain.com/events/2023-02-10/](https://domain.com/events/2023-02-10/),
   but the title is displayed Events on: January 1, 1970.
 * None of the other interface elements display the incorrect date.
 * Cheers,
 *  Plugin Support [WilloftheD](https://wordpress.org/support/users/abzlevelup/)
 * (@abzlevelup)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/title-conflicts/#post-16477078)
 * Hi [@mikehermary](https://wordpress.org/support/users/mikehermary/), thanks for
   your patience and for trying out a couple of suggested solution on this thread.
   Let’s see.
 * I wasn’t able to replicate the issue on my end. Could you share the direct URL
   to the page you’re having issues with? Please do not share any credentials. This
   is for us to follow the [WordPress Forum Guidelines](https://wordpress.org/support/guidelines/).
 * Looking forward to hearing from you.
 * Best,
   Abz
 *  Thread Starter [mikehermary](https://wordpress.org/support/users/mikehermary/)
 * (@mikehermary)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/title-conflicts/#post-16485959)
 * Hello,
 * Sorry for the delayed reply. You can review the in-development events pages here:
   [https://www.flagstaff.ab.ca/events/](https://www.flagstaff.ab.ca/events/). When
   you navigate to the single, past event, you will notice the page title does not
   change from Events Calendar to the name of the event.
 * Cheers,
 *  Plugin Support [Darian](https://wordpress.org/support/users/d0153/)
 * (@d0153)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/title-conflicts/#post-16494483)
 * Hi [@mikehermary](https://wordpress.org/support/users/mikehermary/)
 * Thanks for your response.
 * Where does the `flagstaffcounty_event_thumbnail` function getting called from
   your theme? I’d like to try to replicate it on my end.
 *  Thread Starter [mikehermary](https://wordpress.org/support/users/mikehermary/)
 * (@mikehermary)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/title-conflicts/#post-16494696)
 * Hello,
 * The function is loaded from the `template-tags.php` file located in the **inc**
   directory.
 * I have a similar function for handling the display of WordPress core post and
   page titles, and it works without issue.
 * Cheers,
 *  Plugin Support [Darian](https://wordpress.org/support/users/d0153/)
 * (@d0153)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/title-conflicts/#post-16498055)
 * Hi [@mikehermary](https://wordpress.org/support/users/mikehermary/)
 * Thanks for your response.
 * Unfortunately, I still could not replicate the issue since I am not familiar 
   how your theme is structured. I thought the function was defined inside the theme’s
   functions.php.
 * By any chance, do you know a theme that is structured like your theme, that is
   also available for download from [WP themes?](https://wordpress.org/themes) I’d
   like to test it from there.
 * Looking forward to your reply.
 *  Thread Starter [mikehermary](https://wordpress.org/support/users/mikehermary/)
 * (@mikehermary)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/title-conflicts/#post-16499141)
 * Hello,
 * The theme was developed using Underscore Me as the basis.
 * I have moved the event thumbnail function into the functions.php file, but it
   did not resolve the issue.
 * Cheers,
 *  Plugin Support [Darian](https://wordpress.org/support/users/d0153/)
 * (@d0153)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/title-conflicts/#post-16513982)
 * Hi [@mikehermary](https://wordpress.org/support/users/mikehermary/)
 * Thanks for your response. I tried to replicate the issue on my end using a fresh
   copy of Underscore me theme, and it is working as expected.
 * I added the your function to `inc/template-tags.php`, and called the same function
   from the `header.php`, and the title is working as expected on single events 
   page.
 * The issue you’re encountering could be related to the customization implemented
   on your theme.
 * Please note that we are limited in the amount of support that we can provide 
   for customizations, but if you get stuck or have any questions, please let me
   know – I’ll be happy to try to point you in the right direction!
 *  Plugin Support [Darian](https://wordpress.org/support/users/d0153/)
 * (@d0153)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/title-conflicts/#post-16563677)
 * Hi [@mikehermary](https://wordpress.org/support/users/mikehermary/)
 * This thread has been inactive for a while, so we’ll go ahead and mark it **Resolved**.
   Please open a new thread if any other questions arise, and we’d be happy to help.

Viewing 15 replies - 1 through 15 (of 15 total)

The topic ‘Title conflicts’ is closed to new replies.

 * ![](https://ps.w.org/the-events-calendar/assets/icon-256x256.gif?rev=2516440)
 * [The Events Calendar](https://wordpress.org/plugins/the-events-calendar/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/the-events-calendar/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/the-events-calendar/)
 * [Active Topics](https://wordpress.org/support/plugin/the-events-calendar/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/the-events-calendar/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/the-events-calendar/reviews/)

 * 15 replies
 * 3 participants
 * Last reply from: [Darian](https://wordpress.org/support/users/d0153/)
 * Last activity: [3 years, 2 months ago](https://wordpress.org/support/topic/title-conflicts/#post-16563677)
 * Status: resolved