Title conflicts
-
Hello,
I am using the filter function found here 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.
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="https://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)
Viewing 15 replies - 1 through 15 (of 15 total)
- The topic ‘Title conflicts’ is closed to new replies.