Forums Forums Search & Filter Pro AJAX speed, Loading Animation, Page Title

Viewing 6 posts - 1 through 6 (of 6 total)
  • Anonymous
    #10647

    Great plugin. It’s taking a little bit of work to get it to behave properly with my custom post type, heavily modified Genesis theme, but I’m most of the way there.

    I have a couple questions –

    1. Is there anyway to control the speed that ajax queries and returns results? It currently takes about 5 seconds to process each change, but if there was a way to shorten that, it would improve usability. Perhaps even live filtering?

    2. While the posts are being filtered, the results opacity is lowered. Could we perhaps display a loading gif of some sort there. Again, I think it would improve user experience.

    3. I’m using a custom post type archive as a my template file, but the page meta title is being removed when I use a custom slug. Instead, it is just displaying the site title in the browser tab. Any ideas?

    Thanks!

    Ross Moderator
    #10658

    Hi Joshua

    To answer your questions

    1) When displaying results as an archive option in admin, then results will load slower than if using a shortcode (see the “display results tab”). This is because the archive method essentially loads the next page, extracts the html content, and updates your results. So if your pages are heavy, have lots of code/plugins etc in, then the ajax loading will also be affected.

    The shortcode method runs a custom query and fetches the results from wp-ajax.php – this means you have a lot less loading to do and hopefully that will help with your bottlneck.

    Do you have a link I could check? There may be other influences I could identify.

    Also have you checked our demo – http://demo.designsandcode.com/sfpro-movie-reviews/search/ – this is using the archive method and usually takes no more than a couple of seconds to load results (its also on cheap shared hosting which means it shouldn’t be particularly fast).

    2) I’ve added jQuery events to hook into, so you can detect when loading begins and when it finishes – this way you can show/hide any element you want on your page – for more on that see http://www.designsandcode.com/wordpress-plugins/search-filter-pro/faqs/ with these jQuery events:

    $(".searchandfilter").on("sf:ajaxstart",function(){
    //show loader
    console.log("ajax start");
    });
    
    $(".searchandfilter").on("sf:ajaxfinish",function(){
    //hide loader
    console.log("ajax complete");
    });

    3) There is a hook you can use to update the page title, however, if you are using the shortcode method I’ve described above, then the page title will be set on the page you embed your results shortcode on 🙂

    Let me know!

    Thanks

    Anonymous
    #10788
    This reply has been marked as private.
    Ross Moderator
    #11097
    This reply has been marked as private.
    Anonymous
    #11136
    This reply has been marked as private.
    Ross Moderator
    #11137
    This reply has been marked as private.
Viewing 6 posts - 1 through 6 (of 6 total)