• Hello,

    I can’t seem to get this plugin working. My search.php contains the following:

    <?php if ( have_posts() ): ?>
    <h2>Search Results for '<?php echo get_search_query(); ?>'</h2>
    <ol>
    <?php while ( have_posts() ) : the_post(); ?>
        <li>
                <h2><a href="<?php esc_url( the_permalink() ); ?>" title="Permalink to <?php the_title(); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
                <time datetime="<?php the_time( 'Y-m-d' ); ?>" pubdate><?php the_date(); ?> <?php the_time(); ?></time> <?php comments_popup_link('Leave a Comment', '1 Comment', '% Comments'); ?>
                <?php the_excerpt(); ?>
        </li>
    <?php endwhile; ?>
    </ol>
    <?php else: ?>
    <h2>No results found for '<?php echo get_search_query(); ?>'</h2>
    <?php endif; ?>

    Is there anything wrong? I’m still seeing dates and stuff…

    http://wordpress.org/plugins/relevanssi/

Viewing 1 replies (of 1 total)
  • Plugin Author Mikko Saari

    (@msaari)

    Yes, you’re seeing dates and excerpts and stuff, because that’s what your search results template is displaying. Relevanssi doesn’t change how the results look like, it only changes the results. If you don’t want to see dates on search results page, remove this from the template:

    <time datetime="<?php the_time( 'Y-m-d' ); ?>" pubdate><?php the_date(); ?>

    That’s what’s printing out the date.

Viewing 1 replies (of 1 total)
  • The topic ‘Not working – displaying default results’ is closed to new replies.