Forums Forums Search & Filter Pro Custom CSS code being lost on pagination

Tagged: 

Viewing 10 posts - 11 through 20 (of 21 total)
  • Anonymous
    #107713

    Hi Trevor,

    Thanks for that information.

    Made the change, as suggested, to the wp-config file and it did not help.

    When I go to https://tunegorilla.com/royalty-free-music-store/ that view is being generated by the Content View plug-in. When I use the pagination tabs, at the bottom, the audio player always maintains the correct color and format.

    When I call the Search & Filter plugin by clicking on any of the filters in the left hand column, the first page of results always maintains the correct color and format for the audio player. BUT, with any subsequent choices in the filters (or page tabs) the audio player loses it’s color and size format.

    Art

    Trevor
    #107732

    That must mean that the Content View plugin is using some javascript to add that extra code.

    So, I am confused because you say it happens with or without Ajax on, but the error is Ajax related. So I tested with an without Ajax and without Ajax always worked OK for me.

    Can you check this again?

    I can see that the code is being loaded by a file or files associated with mediaelement.js, which appears to be this:

    https://wordpress.org/plugins/media-element-html5-video-and-audio-player/

    But I do not see that on your site, so I am a bit confused?

    anyway, wherever that code is coming from, you may need to ask the author what code would be needed to be run after an Ajax refresh of the page.

    Anonymous
    #107776

    I disabled the Content View plugin and still getting the same results. Once I move on to the second page with a Search & Filter result, the audio player color and format is changed. I tried with FF, Chrome and IE.

    The audio player is a plugin from these folks https://www.tipsandtricks-hq.com/wordpress-audio-music-player-plugin-4556. They are the developers for my WP-eStore plugin.

    I will go to them and see if they may have an answer.

    Thanks for all of your help Trevor.

    Trevor
    #107786

    They are using this code:

    http://www.mediaelementjs.com/

    So you might get more from John Dyer.

    Anonymous
    #107788

    Okay, thank you.

    Anonymous
    #108163

    Hi Trevor,

    I contacted John Dyer and said this.

    “It looks like the paging system is done with JavaScript (rather than full pages), so when the new content loads, you need to call jQuery(‘audio’).mediaelementplayer(); again to build a player around the new <audio> elements.”

    Not sure what that means as I’m not a programmer but thought I would pass it on to you.

    Take care

    Art

    Trevor
    #108168

    You need to add a small snippet of javascript to the page like this:

    <script>(function ( $ ) {
      "use strict";
      $(document).on("sf:ajaxfinish", ".searchandfilter", function(){
        console.log("ajax complete");
        jQuery('audio').mediaelementplayer();
      });
    }(jQuery));</script>

    Put it in the HTML somewhere BEFORE the loop (output of posts) is executed, between the end of one div and the start of another.

    I have edited this as the wrong type of quote marks were used.

    Anonymous
    #108260
    This reply has been marked as private.
    Trevor
    #108272
    This reply has been marked as private.
    Anonymous
    #108278
    This reply has been marked as private.
Viewing 10 posts - 11 through 20 (of 21 total)