WordPress.org

Ready to get started?Download WordPress

Forums

Relevanssi - A Better Search
updated to Relevanssi 3.0 and now two thumbnails show up in (7 posts)

  1. wpfotokel
    Member
    Posted 2 years ago #

    Ever since I updated Relevanssi to 3.0, using WordPress 3.3.2, a second thumbnail now appears in the search results. I'm using SuperSlider-Excerpt 1.7.

    Here's an example of the problem.

    http://www.culturalinquiry.org/blog/?s=books

    The thumbnail on the left of all the results shouldn't be there.
    Can anyone help me?

    Thanks!

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

  2. Mikko Saari
    Member
    Plugin Author

    Posted 2 years ago #

    Hmm, hard to say. SuperSlider-Excerpt adds the excerpts using the "get_the_excerpt" filter, which Relevanssi calls once per excerpt, as it should. So, I don't know where the second one comes from.

    I took a look at the plugin and well... First of all, it does produce a rather large number of notices and errors. However, looks like if take a look at the superslider-excerpt.php file and find this at line 308 or so:

    global $wp_query, $wpdb;
    $id = $wp_query->post->ID;
    $post_title = $wp_query->post->post_title;

    and change it to this:

    global $wp_query, $wpdb, $post;
    $id = $post->ID;
    $post_title = $post->post_title;

    it might work a bit better. It still doesn't work very well, though, and like I said, if you enable debugging, you'll notice the plugin spits out a ton of notices and warnings. SuperSlider-Excerpt hasn't been updated in more than two years, and it's starting to show.

    If all you want is a thumbnail in search results, there are other - perhaps easier - ways to achieve that.

  3. wpfotokel
    Member
    Posted 2 years ago #

    That worked for one of my blogs, the second image went away though now the single thumbnail is smaller than before.

    My other blog, I made this above changes and it still shows two thumbnails, though now the images are exactly the same, whereas before they were different images.

    Do you know of another plug-in that you recommend like superslider-excerpt which works better and is more updated?

    Thanks!

  4. Mikko Saari
    Member
    Plugin Author

    Posted 2 years ago #

    I've never used a plugin for that, I've just added the thumbnails manually to the search results templates. Where do you store those thumbnails? Depending on that, adding them manually is either easy or fairly easy.

  5. wpfotokel
    Member
    Posted 2 years ago #

    search result templates? The images are stored in the WP media library. I want the thumbnail next to the excerpt to be of the image from the post that the excerpt is from.

  6. Mikko Saari
    Member
    Plugin Author

    Posted 2 years ago #

    Search results template is what actually displays the search results. How the thumbnails are specified in the posts? For example, on one of my sites I have the thumbnail URL in a custom field "thumbnail" and I simply use that to show the correct thumbnail. It's very simple, one line of code, no extra plugin necessary.

  7. wpfotokel
    Member
    Posted 2 years ago #

    What would the code be? There will potentially be people working on the blog that are not familiar with WordPress so I would rather use a plug-in. Would I be able to use the SuperSlider-Excerpt still and use the custom field one line code to fix just the problem excerpt thumbnails?

    I've also noticed that some of the excerpt images are showing up regular sized and not thumbnail size. Ex.
    http://www.culturalinquiry.org/laboratory/category/raw-material/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic