Forums › Forums › Search & Filter Pro › Sort not working after first results
- This topic has 35 replies, 2 voices, and was last updated 8 years, 10 months ago by Ross.
-
Anonymous(Private) January 5, 2016 at 7:51 pm #33413
Ok.
This is twentyfifteen, all plugins but S&F Pro are disabled, this is a new search form, the shortcode for the search is placed in the editor, and the jquery test code is just above the footer in page.php:
http://betest.wpengine.com/search-test/
(please see above posts for credentials on this site)Only “ajax init” shows in the console on initial load of the page. I do see “ajax start” on the results page but not “ajax complete,” which is the function that I need to work to reload javascript.
Please look around and see if you can tell me what the problem might be. I took out variables one by one to get to this. I’ve tried everything that I can do at this moment.
Thanks for your continued support.
-StephanieRoss Moderator(Private) January 5, 2016 at 9:04 pm #33429Hi Stephanie
So I just logged in.
I noticed the code I mentioned above was not added.
So I added the jQuery code to
twentyfifteen/js/functions.js
– you’ll find this at the very end of the file.What you will notice now if you check the form I created – added to the sidebar, set to use this slug/url:
http://betest.wpengine.com/rossslug/– that if you check the console there are loads of ajax start/finish fired.
I really have no idea how you are setting up the other forms (I guess because we switched to 2015 there might be some errors with your existing forms & templates etc) but the one I created, with the code I mentioned seems to at least be firing events.
I’m completing an update tonight, after which we can upload to the test site and see if those multiple console logs are fixed.
Thanks
Ross Moderator(Private) January 6, 2016 at 1:02 pm #33465Hi Stephanie
I just uploaded the latest update and the events seems to be working better now.
On my test form I linked above, if you check the console, the ajax events are fired once 🙂
I’ll be releasing this version officially later on today.
Thanks
Anonymous(Private) January 12, 2016 at 4:57 pm #34042For the benefit of others, I wanted to document my conclusions so far…
I did have the js code that you mentioned. I mentioned that it was in the footer of the page template…I didn’t place it in a .js file that was being enqueued. As it turns out, the location wasn’t the issue though. I had:
jQuery(function ($) {
instead of
jQuery(document).ready(function($) {
You did tell me to make sure that it was in a ready function, but I thought I was doing that already…I was not. This detail enabled the functions to execute as they were intended.I was using the video shortcode to display videos in the feed. The file that I needed to reload was:
/wp-includes/js/mediaelement/wp-mediaelement.jsI am still troubleshooting the infinite scroll functionality.
Thanks!
Ross Moderator(Private) January 13, 2016 at 11:10 am #34103Great thanks for the update Stephanie! 🙂
-
AuthorPosts