SERP: No results text

This topic contains 3 replies, has 2 voices, and was last updated by  Stephen Harris 8 years, 1 month ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #25428

    Hi,
    where can add an “no results” text for the event search SERP?

    Patrick Merck
    #25431

    In Pro there is a template (templates/search-event-list.php) you can copy to your theme and edit to display text if not results are found.

    Stephen Harris
    #25433

    Don’t kill me, but where could I write the display text?

    <?php elseif ( ! empty( $eo_event_loop_args['no_events'] ) ): ?>
    
        <ul id="<?php echo esc_attr( $id );?>" class="<?php echo esc_attr( $classes );?>" >
            <li class="eo-no-events" > <?php echo $eo_event_loop_args['no_events']; ?> 
        
    
    <?php endif; ?>
    
    Patrick Merck
    #25457

    I won’t kill you 🙂

    By default the you can use shortcode [event_search no_events="Sorry, no events"].

    But, if you want something more involved than just text, replace the entire snippet you posted with:

    <?php elseif ( ! empty( $eo_event_loop_args['no_events'] ) ): ?>
    
        <strong>Your HTML here!</strong>
    
    
    <?php endif; ?>
    
    • This reply was modified 8 years, 1 month ago by  Stephen Harris.
    Stephen Harris
Viewing 4 posts - 1 through 4 (of 4 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.