• Resolved EloWi

    (@guigasoil)


    Hi, I am using the ‘Simple Custom Post Order’ plugin. When it is deactivated, the relevanssi search works fine. However, when it is activated, even after adding the function ‘add_filter( ‘relevanssi_orderby’, function ( $orderby ) {return ‘relevance’; } );,’ the search does not work. Is there any other element to add in the functions.php file? It used to work well with this function some time ago… thanks a lot !

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

    (@msaari)

    It’s almost right. Simple Custom Post Order does two things, and that snippet fixes only one of them. This version fixes both:

    add_filter( 'relevanssi_orderby', function ( $orderby ) { return array( 'relevance' => 'desc' ); } );
Viewing 1 replies (of 1 total)

The topic ‘Simple Custom Post Order’ is closed to new replies.