This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Forum Replies Created

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • in reply to: Add condition to "asp_query_args" #25712
    maxsstylemaxsstyle
    Participant

    Hi,

    I finally managed to do what I wanted using an iframe with the results of a search form dedicated to buddypress. Now I would like to order the results using a custom field but the buddypress’ custom-fields doesn’t seems to be found. Ordering with custom-fields only works for post and post-type.

    Is it normal ?

    Thank you,
    Best regards,

    Nicolas

    in reply to: Add condition to "asp_query_args" #25606
    maxsstylemaxsstyle
    Participant

    Ok thank you again for your answer.

    So would it be possible to have two search form with the results displaying on two different loops on the same page ?

    I could hide the second form and use Javascript to copy the search phrase in the second form.
    So when when the user write a search phrase and press enter :
    Form 1 would have the results displayed in loop 1.
    Form 2 would have the results displayed in loop 2.

    If it’s possible could you please explain me how ?

    Thank you,
    Best regards,

    Nicolas

    in reply to: Add condition to "asp_query_args" #25592
    maxsstylemaxsstyle
    Participant

    Thank you Ernesto.

    I probably wasn’t clear enough. My previous code worked and I just tried yours and he works too.

    But this is not what I wanted to do. I don’t want to exclude the entire form number 14 from the filter.

    In my form number 14 I am searching for custom post-type in wordpress AND buddypress activities in buddypress. If we imagine that on 100 results, 20 are from buddypress, I wan’t to exclude the 20 from the filter, but the 80 others should be included in the filter.

    add_filter('asp_query_args', 'map_search_phrase', 10, 2);
    function map_search_phrase($args, $search_id) {
    	// search IDs to exclude
    	$exclude_ids = array(13, 14);
    	
    	if (  !in_array($search_id, $exclude_ids AND results != buddypress_results ) ) {
    		$args['s'] = mb_strtolower($args['s']);
    ...

    Thank you again,
    Best regards,

    Nicolas

    in reply to: Excerpt keywords – Result dynamic search box #12954
    maxsstylemaxsstyle
    Participant

    Hi Ernest,

    Thank you for your fast reply!
    I’ve finally chosen to use the regular search engine so I’m not having problem anymore.

    I wish a lot of success with this search engine, it’s really good 🙂

    Best regards,

    Nicolas

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