Filter by YYYY and Search topic in filter

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Filter by YYYY and Search topic in filter

This topic contains 44 replies, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 2 years, 4 months ago.

Viewing 15 posts - 16 through 30 (of 45 total)
  • Author
    Posts
  • #35459
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    1. Sure, you can do that via a small modification:

    function asp_change_print_search_query($query, $search_id) {
    	if ( $search_id == 1 ) {
    		return '';
    	} else {
    		return $query;
    	}
    }

    Just change the number to the search ID for which you want to apply the code.

    2. Well, if you are using an elementor shortcode or similar widget, you could add this HTML code just before the shortcode:

    <div class="asp_w asp_sb searchsettings" style="visibility: visible !important; display: block !important"><fieldset><legend>Topic</legend></fieldset></div>

    This should basically push the same exact layout as the other labels.

    3. That is not possible unfortuantely. Grouping is only available for the live results list when using the vertical layout.

    4. The groups order can be set here – where you can also change the position of the “Other results” group.
    Also, you may want to have this option disabled as well.

    Best,
    Ernest Marcinko

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


    #35535
    anguraj48
    anguraj48
    Participant
    You cannot access this content.
    #35567
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi Raj,

    So the first option needs to be coded via Elementor. All the plugin does is passes the arguments to the elementor widget to get the items, and then Elementor gives back the output, which the plugin puts back to the page. The output is generated by Elementor, therefore it needs to be coded on that end. I am unfortunately not aware of any hooks on how to modify that.

    The second option should be doable. You can use the search results shortcode to place the result somewhere on the same page. You can simply replace the relementor widget with that. If you enable auto populate feature, results will be displayed initially on page load as well. On that layout I recommend turning off this option, so the results box does not close.

    Best,
    Ernest Marcinko

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


    #35571
    anguraj48
    anguraj48
    Participant

    Hi Ernest,

    Thanks for the solution.

    I have used the results shortcode and removed the Elementor widget also enabled the auto-populate feature and turned off search focus but it not working.

    Please check this link http://dev.sightandlife.org/result/ We have followed all the steps which you have asked us to do but it is not loading the result if we choose a filter or type the search term in the search box.

    Please help us to fix this.

    Thanks and Regards,
    Raj.

    #35574
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    You still have an element on the page with the class name “asp_es_5” present on the page: https://i.imgur.com/tATa9J0.png
    The plugin tries to use that as the elementor results container instead of using it’s own results. If you remove that, it should start working.

    Best,
    Ernest Marcinko

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


    #35576
    anguraj48
    anguraj48
    Participant
    You cannot access this content.
    #35577
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    It is added via Elementor to one of the elementor widgets, I can’t see from the source exactly whihc one. Looks like an Elementor Posts widget, maybe only visible for tablets.

    Best,
    Ernest Marcinko

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


    #35580
    anguraj48
    anguraj48
    Participant
    You cannot access this content.
    #35584
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    Try setting the redirection to the result page like so: https://i.imgur.com/dG7O5qd.png

    result/?asp_s={phrase}&asp_id=5

    For the results search, you can turn off the scrollbar as well: https://i.imgur.com/c4MZlM9.png

    Best,
    Ernest Marcinko

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


    #35586
    anguraj48
    anguraj48
    Participant

    Hi Ernest,

    You are really really so cool.

    You are the best plugin developer. Thanks a ton for your prompt response.

    I have updated all the settings as mentioned above, for redirect and all but it is still showing the result below the search filed.

    Please find the attached screenshot.

    Thanks and Regards,
    Raj

    Attachments:
    You must be logged in to view attached files.
    #35589
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Thank you!

    It is probably because of the auto populate. Try turning that off, you may not need it at all, as redirecting to the result page will automatically trigger the search via the filters.

    Best,
    Ernest Marcinko

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


    #35590
    anguraj48
    anguraj48
    Participant

    Ernest,

    I have turned off the auto-populate but it still shows the result below search box does not redirect if I’m clicking the search button after choosing the filter option.

    http://dev.sightandlife.org/sal_magazines/

    Please do the needful

    Thanks and Regards,
    Raj

    • This reply was modified 2 years, 6 months ago by anguraj48 anguraj48. Reason: Updated
    #35593
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hm, it may need some custom code after all.

    Step #1: Change the search button redirection to the same URL as before:

    result/?asp_s={phrase}&asp_id=5

    Step #2: 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_shortcode_search_options', 'asp_change_on_result_page', 10, 1);
    function asp_change_on_result_page($args) {
        if ( get_queried_object_id() == 12276 ) {
    		$args['fe_sb_action'] = 'ajax_search';
    	}
    
        return $args;
    }
    Best,
    Ernest Marcinko

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


    #35595
    anguraj48
    anguraj48
    Participant

    Ernest,

    You are so awesome.

    It is working now. Thank so you very much!

    Probably one lost thing from our end, Is it possible to add “Show more” after each category, which means we are having 10 categories so that for every category we will display 10 results and add show more button and upon clicking we can show more result.

    or
    Is it possible to add a load more in common after showing 50 results so that users can click show more and view the result?

    http://dev.sightandlife.org/result/

    Awaiting your response.

    Thanks and Regards,
    Raj.

    #35616
    anguraj48
    anguraj48
    Participant
    You cannot access this content.
Viewing 15 posts - 16 through 30 (of 45 total)

You must be logged in to reply to this topic.