So I guess you only need to add the proper filter for the link and the description. The title is working, because it’s using the get_the_title($pageposts[$k]->id); function, and I guess qtranslate already applies a filter on the get_the_title funtion.
What you need, is to find the proper qtranslate filter for the content and the url. What I have found out from the qtranslate source code, is this:
- qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage -> content filter
- qtrans_convertURL -> url filter
Okay, now all you need to do is add these filters to the search source code:
- Open up the ajax-search-pro/search.php
- go to line 269 and make a new line
- add the following lines:
apply_filters('qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage', $_content); apply_filters('qtrans_convertURL', $pageposts[$k]->link);
If the permalink is still not good, then try to modify the second line to: apply_filters(‘the_permalink’, $pageposts[$k]->link);
Let me know how it goes!
- This reply was modified 8 years, 6 months ago by Ernest Marcinko.
- This reply was modified 8 years, 5 months ago by Ernest Marcinko.
If you like my products, don't forget to rate them on codecanyon :)