Select All option causing issue and duplicate results on result page

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Select All option causing issue and duplicate results on result page

This topic contains 5 replies, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 3 weeks, 2 days ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #40773
    pratik-klera
    pratik-klera
    Participant

    Hi, I am facing some functional issues while integrating the search on our staging website(https://www.klera.online/). I have integrated the live search and result page and I have noticed below issues on the result page:
    1) Duplicate items in results: Few items are repeated on the result page, When I searched for a term then I got one item on the first page of the result and the same item I found on the second page also.
    2) Select ALL function: I have added a search filter on the result page by using the shortcode “[wpdreams_asp_settings id=1 element='div']” and I am using only post type filter, and when we check or uncheck the checkboxes it remains the same after result load and sometimes it shows “No Result Found”.

    3) There is no option to make Post type filter checkboxes unchecked by default.
    4) I need to add synonyms that have more than 2 words like “ALM: Application lifecycle Management” but I can’t add them as they get separated when we add space.

    Please help me out to sort this.

    #40786
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    Thank you for the details, it helps a lot!

    1. May I ask what phrase should I try? I have tried a few different phrases, and saw items with the same titles – but the result URLs were different. For example “tool”, I see two items named Data synchronization, but both are separate posts with the same title on different URLs.

    2. Currently I can’t see a select all filter on the results page only the post type filters. I tried on our local server though, but it all seemed to work all right. If you want, you can add temporary FTP and back-end access and I will test it for you.

    3. It is under reworking at the moment, but you can still make them unchecked: Under the Search Sources -> Post type search panel just delect the post types, which you want to have unchecked by default: https://i.imgur.com/9mgppj6.png
    The ones that are not selected will be unchecked.

    4. Unfortunately that is not possible at the moment. Synonyms are restricted to single words. This will very likely change in the future though.

    Best,
    Ernest Marcinko

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


    #40802
    pratik-klera
    pratik-klera
    Participant
    You cannot access this content.
    #40809
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    2. Okay – the one issue I can see there, that when I uncheck it resets the settings. That happens because the live loading selector includes the search bar as well, so it resets the search contents to the default.
    Please try the following live loading jQuery selector:
    #primary .search-result-item>.row>div:last-of-type

    3. Make sure you are looking at the correct settings, please check the screenshot. If you remove the options on the Search Sources -> Post type search panel, it will not remove the options.

    One more thing, in the ASP meta box on the edit post page, “Additional search tags for this post (space separated)”, the tags are separated by space it should be separated by commas so we can add different terms as keywords.
    Thank you for your suggestion, currently it is intentionally made for single keywords. It may change in the future.

    Best,
    Ernest Marcinko

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


    #40814
    pratik-klera
    pratik-klera
    Participant
    You cannot access this content.
    #40823
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Oh, okay. I’m afraid that will not apply to the post type selectors (because of the lack of checked/unchecked features).

    There is still hope, it might be possible to get by via a custom code. Try adding this code to the functions.php file in your theme/child theme directory – make sure to have a full server back-up first for safety. For more details you can check the safe coding guidelines.

    add_filter( 'asp_query_args', 'asp_add_post_types_on_empty', 10, 1 );
    function asp_add_post_types_on_empty($args) {
    	if ( empty($args['post_type']) ) {
    		$args['post_type'] = array('page', 'resource', 'post', 'on_demand_demo');
    	}
    	return $args;
    }
    Best,
    Ernest Marcinko

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


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

You must be logged in to reply to this topic.