Forums Forums Search & Filter Pro Dynamic result URL

Tagged: ,

Viewing 5 posts - 11 through 15 (of 15 total)
  • Anonymous
    #193861

    Ok done it, switching categories seems to be working now with Ajax enabled.

    But now it looks like the player is not loading if I switch between categories (corporate <-> ambient)

    Trevor
    #193865

    Is it possible that, for an ordinary page load, the player is a script that scans the page and attaches itself to the music in the posts?

    If so, after Ajax is run, that would need to be done again. We have a script into which you need to palce that code but I would not know what code from your media player you need.

    Anonymous
    #193878

    This waveplayer automatically replaces the Native WP audio player. All you have to do is activate the plugin and all WP players are replaced.

    But I found this on thier website:

    The main script of WavePlayer initializes every instance of the player after the page completes loading.

    If the theme you are using on your website loads pages through AJAX – which means that only a specific part of the content of the page gets updated without reloading the whole browser page – the script has already been invoked and cannot initialize those instance that are present in the new content of the page. In order to properly display the new players, it is necessary to call the initialization command right after the AJAX page loading completes. This command is:

    WavePlayer.loadInstances();
    If the theme implements callbacks triggered at the completion of the AJAX loading, it will be enough to add the line of code specified above to have all the instances of the player initialized.

    Is this what you mean?

    Trevor
    #193946

    So, based on that, you need to add this script to these pages:

    <script>(function ( $ ) {
      "use strict";
      $(document).on("sf:ajaxfinish", ".searchandfilter", function(){
        WavePlayer.loadInstances();
      });
    }(jQuery));</script>
    Anonymous
    #193950

    Yes, it is working.

    Thanks! 🙂

Viewing 5 posts - 11 through 15 (of 15 total)