Forums › Forums › Search & Filter Pro › Custom CSS code being lost on pagination
Tagged: custom css
- This topic has 20 replies, 2 voices, and was last updated 7 years, 6 months ago by Trevor.
-
Anonymous(Private) May 9, 2017 at 4:39 pm #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(Private) May 9, 2017 at 5:49 pm #107732That 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(Private) May 9, 2017 at 6:46 pm #107776I 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.
Anonymous(Private) May 11, 2017 at 5:07 am #108163Hi 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(Private) May 11, 2017 at 6:59 am #108168You 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.
-
AuthorPosts