Search Issues

This topic contains 1 reply, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 4 years, 3 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #25211
    AttilaNagy49
    AttilaNagy49
    Participant

    Hi there,

    I have an issue with the displayed results. The ajax search finds the post, however it displays it in an incorrect manner. For example, search for Vertoni in the searchbox and the resulting link (once clicked) is https://www.registrulconstructorilor.ro/review/vertoni-case/. Unfortunately the correct link to show the reviews for a company is https://www.registrulconstructorilor.ro/review/vertoni-case/?r=s. The search correctly pick up the company name however the resulting links should all be with /?r=s at the end in order for the reviews to be displayed.

    Can you kindly have a look into this matter ?

    Many thanks.

    Attila Nagy

    #25213
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi Attila,

    Thank you for all the details, it helps us a lot.

    So, I have looked up the given review on the review editor screen, and the permalink of that review is the same as the plugin is returning (without the ?r=s argument): https://i.imgur.com/BxTKrT6.png

    If you wish to add that string to the results, it is possible via a custom code. Try adding this custom code to the functions.php in your theme/child theme directory. Before editing, please make sure to have a full site back-up just in case!

    add_filter( 'asp_results', 'asp_custom_link_results', 10, 1 );
    function asp_custom_link_results( $results ) {
    
      foreach ($results as $k=>$v) {
        $results[$k]->link  .= '?r=s';
      }
    
      return $results;
    }

    This should append the ?r=s part to the end of all results links.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.