Forums Forums Search & Filter Pro Need help with sorting of results on results page

Tagged: 

Viewing 9 posts - 1 through 9 (of 9 total)
  • Anonymous
    #266916

    Hi Team,
    Greetings !

    I would like to get help in sorting the results which shows on results page. i mean i have uploaded logos and i want to sort them in alphabetical order in frontend. which means in the backend, user can upload any logo in any order but they should be sorted in frontend.

    for this we have to edit wp_query, so do let me know how can i customize the query .

    Here is the page where i need to sort the results : http://evc.thewebchef.co/investments/
    currently you would see that the logos are already sorted but i have done them manually with another plugin but i want to actually customize the query because i will be uploading more logos once the customization is done. so please let me know about it .

    looking forward to your response asap .

    Trevor
    #266976

    If you edit the form, at the top are tabs. The third tab is ‘Posts’. This allows you to set a sort order, by one or two keys. Or do you need to make a more sophisticated sort, in which case you might need to sue this filter:

    https://searchandfilter.com/documentation/action-filter-reference/#edit-query-arguments

    If you use a plugin to drag and drop the order, this will likely conflict with our plugin.

    Anonymous
    #267216

    Hey Team,

    Thanks for the response it was helpful and the problem is sorted now .

    However i have one more issue to address . when i start using ajax to load my results. the jquery i add to my results to flip each element dont work. so i have analysed that whenever plugin’s ajax works, my jquery gets stopped. but that should be working fine actually because thats the requirement of my client. so can you help me sort that out. or send me a function which i can run like :

    run my jquery code after that ajax call gets success or something like this ?
    here is the results page : http://evc.thewebchef.co/investments/

    currently i have disabled ajax but i want to enable it . i might have shared login details of site with you but if not then please let me know if you need them because i really want it sorted .

    looking forward to your response asap .

    Trevor
    #267508

    Hi, you need to add a small snippet of JavaScript to reload that JavaScript, like this:

    <script>(function ( $ ) {
    “use strict”;
    $(document).on(“sf:ajaxfinish”, “.searchandfilter”, function(){
    // call your script or function here
    });
    }(jQuery));</script>

    Make sure you do NOT place that inside any code that runs on document load.

    Anonymous
    #267657

    Hey Trevor,

    I tried this script, but didnt work for me. can you check it whats wrong ?

    (function ( $ ) {
    "use strict";
    $(document).on("sf:ajaxfinish", ".searchandfilter", function(){
    $('.f1_container').click(function() {
        $('.f1_container.active').not(this).removeClass('active');
    	$(this).toggleClass('active');
        });
    });
    }(jQuery));

    on this url, http://evc.thewebchef.co/investments/ .

    Anonymous
    #267737

    Hey Trevor,

    Can you reply on this please? as its very very urgent to be solved.

    Trevor
    #267739

    I am sorry, your previous reply came in just before we closed for the day here in the UK, and we will be starting work in about half an hour. I am not an expert on JavaScript, so I am not the one to ask about your coding.

    However, I checked the page you gave in that reply, and that code is not on that page, nor in any JavaScript files loaded by that page. That could be why it isn’t working.

    Anonymous
    #267759

    That code is currently not in any files . because i added that , then removed because it was not working. and i shared link of the page and the full code with you so that you can try that code in console your side and see if there is any issue .

    i have added my code in your script you sent. so can you debug that out ASAP please ?

    Trevor
    #267762

    As I said, I am not an expert on JavaScript, and help with adding and writing code is not within the scope of our support, sorry. You would need to consult a third party JavaScript coder to help you with this.

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