• Resolved Webfolio Webdesign

    (@webreneszansz)


    Hi,

    Please be so kind and let me know, in which file can I add the Yoast Seo breadcrumb code directly after the event title?

    <?php
    if ( function_exists(‘yoast_breadcrumb’) ) {
    yoast_breadcrumb( ‘<p id=”breadcrumbs”>’,'</p>’ );
    }
    ?>
    Itried to edit the content-single-event-listing.php, but it was only possibility to add the code to the min content, however, I need the title and the bredcrumb in one div, since I would like to add some background iamage to this part of the events.

    Thank you very much!

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi @webreneszansz,

    You can add it inside a template called content-single-event_listing.php to your theme side and add your custom breadcrumb.

    If you want to create custom template for single event page then please follow this doc and create a template file called single-event_listing.php for the main structure
    https://wp-eventmanager.com/documentation/single-event-listing-page/

    Thank you

    Thread Starter Webfolio Webdesign

    (@webreneszansz)

    Hi,

    I treid, but I cannot place the breadcrumb directly under the title.

    The top of the template:

    <?php
    global $post;
    $start_date = get_event_start_date ();
    $end_date = get_event_end_date ();
    wp_enqueue_script(‘wp-event-manager-slick-script’);
    wp_enqueue_style( ‘wp-event-manager-slick-style’);
    do_action(‘set_single_listing_view_count’);
    ?>
    <div class=”single_event_listing” itemscope
    itemtype=”https://schema.org/Event”&gt;
    <meta itemprop=”title”
    content=”<?php echo esc_attr( $post->post_title ); ?>” />

    <div class=”wpem-main wpem-single-event-page”>
    <?php if ( get_option( ‘event_manager_hide_expired_content’, 1 ) && ‘expired’ === $post->post_status ) : ?>
    <div class=”event-manager-info wpem-alert wpem-alert-danger” ><?php _e( ‘This listing has been expired.’, ‘wp-event-manager’ ); ?></div>
    <?php else : ?>
    <?php if ( is_event_cancelled() ) : ?>
    <div class=”wpem-alert wpem-alert-danger”>
    <span class=”event-cancelled” itemprop=”eventCancelled”><?php _e( ‘This event has been cancelled’, ‘wp-event-manager’ ); ?></span>
    </div>
    <?php elseif ( ! attendees_can_apply() && ‘preview’ !== $post->post_status ) : ?>
    <div class=”wpem-alert wpem-alert-danger”>
    <span class=”listing-expired” itemprop=”eventExpired”><?php _e( ‘Registrations have closed’, ‘wp-event-manager’ ); ?></span>
    </div>
    <?php endif; ?>
    <?php
    /**
    * single_event_listing_start hook
    */
    do_action ( ‘single_event_listing_start’ );
    ?>

    Were is the optiml place for the breadcrumb to make it visile directly under the title?

    Thank you very much!

    Hi @webreneszansz,

    It is inside your template file and you have generated from your theme structure. All I can say is your template file is containing title <h1 class=”entry-title”><?php the_title(); ?></h1>

    I would suggest you ask your developer to check and do the changes for you.

    Thank you

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Add Yoast breadcrumb to event title’ is closed to new replies.