The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Relevanssi - A Better Search
Disable wp-post-image from search results (2 posts)

  1. dlishus
    Posted 4 years ago #


    I just upgraded to Version 3.0.3 (Free), and I'm seeing the wp-post-images in my search results. I temporarily hid them using css, but for a quick moment you can see them load. I would like to exclude these from the search results. How can I do so?

    This is my code for search.php

    <?php while (have_posts()) : the_post(); ?>
    			<div <?php post_class() ?>>
    				<h3 id="post-<?php the_ID(); ?>">
    				<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3>
    				<small><?php the_time('l, F jS, Y') ?></small><br>
    				<?php echo strip_tags(get_the_excerpt());?>			</div>
    		<?php endwhile; ?>
    		<?php if(function_exists('wp_pagenavi')) { // if PageNavi is activated ?>
    <?php wp_pagenavi(); // Use PageNavi ?>
    <?php } // End if-else statement ?>
    	<?php else : ?>
    		<h2 class="center">No posts found. Please try a different search term or phrase.</h2>
    		<?php get_search_form(); ?>
    	<?php endif; ?>


  2. Mikko Saari
    Plugin Author

    Posted 4 years ago #

    I don't know. Relevanssi should not add any images to search results. How are you displaying those images usually, where Relevanssi could be grabbing them? Do they appear in every post, or in just some posts?

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Relevanssi - A Better Search
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic