• Resolved elainevdw

    (@elainevdw)


    Hey there, first of all, LOVE this plugin — so awesome!

    However, I’m having trouble getting the custom snippets to work.

    My search.php file calls the loop. Inside the loop, I have a conditional checking if it’s a search:

    if(is_search()):

    Inside this condition I’m calling the Relevannsi excerpt or the WP excerpt if Relevanssi doesn’t exist.

    if (function_exists('relevanssi_the_excerpt')) {
         relevanssi_the_excerpt();
    }else{
         the_excerpt();
    }

    However, the excerpts still don’t contain the search terms — here’s a screenshot.

    Any idea what I did wrong to break it?

    Thank you!

    https://www.ads-software.com/plugins/relevanssi/

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

    (@msaari)

    This might be caused by a bug in the latest version of Relevanssi. Take a look at lib/excerpts-highlights.php in Relevanssi folder and replace the two usort() calls with uksort(). Does that help?

    Thread Starter elainevdw

    (@elainevdw)

    Hi Mikko, thanks so much for the reply! When I replaced the usort()s with uksort(), I got a 500 server error.

    Plugin Author Mikko Saari

    (@msaari)

    Are you sure you didn’t make typing errors, or change the parameters of the function calls?

    Thread Starter elainevdw

    (@elainevdw)

    Hey there, I went to pick this issue back up and it seems to be resolved! I’m guessing there was an update since I originally posted? In any case, thank you very much.

    Plugin Author Mikko Saari

    (@msaari)

    Yes, Relevanssi 3.1.7 fixed this.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Custom excerpts/snippets not working with relevanssi_the_excerpt or the_excerpt’ is closed to new replies.