Can’t get single event title
-
Hi. I can’t seem to display the event title on single page.
Here is my setup :single.php
get_header(); ?> <?php while ( have_posts() ) : the_post(); ?> <?php get_template_part( 'template-parts/content-header' ); ?> <div class="main-wrap" role="main"> <article> <?php the_content(); ?> </article> <?php endwhile;?> <?php get_sidebar(); ?> </div> <?php get_footer();
template-parts/content-header.php
<?php // header d'une page/article/archive ?> <section class="content-header"> <div class="grid-container"> <div class="grid-x"> <div class="cell small-12"> <header> <?php if ( is_archive('tribe_events') ) : // si on est dans la page agenda $titre = "Agenda"; elseif( is_singular( 'tribe_events' ) ) : // si on est sur la page d'un événement $titre = get_the_title(); else : // tous les autres cas $titre = get_the_title(); endif; ?> <h1 class="entry-title fantome" data-titre="<?php echo $titre; ?>"><?php echo $titre; ?></h1> </header> </div> </div> </div> <?php if ( function_exists('yoast_breadcrumb') ) { yoast_breadcrumb('<p id="breadcrumbs">','</p>'); }?> <?php if ( !is_front_page() && is_home() ) { // blog page }else { ?> <?php get_template_part( 'template-parts/featured-image' ); ?> <?php }; ?> </section>
I also have Yoast SEO breadcrumbs and only “Home” is displayed on single events page, whereas it works fine everywhere else.
I tried many things like
tribe_get_events_title()
but nothing works.Help ? ??
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Can’t get single event title’ is closed to new replies.