Tagged: php, relevanssi, results, search, Tags
-
AuthorPosts
-
May 18, 2015 at 9:00 am #445524
Hello Enfold.
I just had relavanssi installed (also AJAX results, thanks for the help) and I have a few issues.The ajax results are too many. I found some css here too limit the search box and add a scrollbar(https://kriesi.at/support/topic/limit-ajax-search-results-with-relevanssi/). that works nice. But the you still have to many results (10 pages alone, and then some portfolio items etc.)
I would like to old amount back if possible.
Also relevanssi finds html tags when searching in the ajax box. This:
add_filter(‘avf_ajax_search_excerpt’,’avia_strip_search_result_tags’, 10, 1);
function avia_strip_search_result_tags($content){
$content = strip_tags($content,”);
return $content;
}Didn’t do anything.
And last
The tags for the blog don’t work anymore.
any ideas on these issues?
May 19, 2015 at 3:14 am #446164Hi WolfvanHaeren!
Thank you for using Enfold.
Please add this in the functions.php file to limit the number of posts for each post type to 3:
add_filter('avf_ajax_search_query', 'avf_modify_ajax_search_query', 10, 1); function avf_modify_ajax_search_query($search_parameters) { parse_str($search_parameters, $params); $params['numberposts'] = 3; $search_parameters = http_build_query($params); return $search_parameters; }
You can adjust the numberposts value if you want.
Cheers!
IsmaelMay 19, 2015 at 8:44 am #446243Hello Ismael,
I am afraid this didn’t help. I still have like 20 results. Most of it is a lot of pages as results and just a couple portfolio and posts.Also do you have any idea for the other issues, html tags in the AJAX results and the tags for posts that don’t work anymore?
cheers
Wolf
Also is it possible to force the results in an order page results- post results- portfilio results.
Now sometimes portfolio comes first. That is something we don’t really like.
Cheers
- This reply was modified 9 years, 6 months ago by Wolf.
May 20, 2015 at 6:18 am #446921Hi!
The code works on our installation. Ajax search result per post type is limited to 3. The excerpt should be hidden on the ajax results. Please update the theme to 3.1.5.
Best regards,
IsmaelMay 20, 2015 at 10:30 am #447013I have removed relevanssi the tags need to work. This can be closed
thanks for the help
-
AuthorPosts
- The topic ‘Relevanssi issues’ is closed to new replies.