Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Some Contents Missing
This topic contains 22 replies, has 2 voices, and was last updated by Alex Meda 3 years, 2 months ago.
- AuthorPosts
- January 2, 2021 at 7:08 pm #30963You cannot access this content.January 4, 2021 at 9:43 am #30971You cannot access this content. Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
January 5, 2021 at 6:11 am #31002You cannot access this content.January 5, 2021 at 1:36 pm #31008Thanks! It was actually there, but the siteground optimizer moved it to an external file for caching, I could not see it there.
I made a change to the actual script file, which may actually work, the final code is now:
add_action('wp_footer', 'asp_custom_wp_footer'); function asp_custom_wp_footer() { ?> <script> jQuery(function($) { var t; $('.asp_main_container').on('asp_search_start', function(){ clearTimeout(t); var $this = this; t = setTimeout(function(){ $('body,html').animate({'scrollTop': $($this).offset().top - 240}, {"duration": 240}); }, 50); }); }); </script> <?php }
I had to disable the scroll to results feature for this to work. Please note that I cannot guarantee this code to work in all cases on all search bars. For further improvements, you may have to consult with an external developer as well.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
January 6, 2021 at 4:48 pm #31037Thanks a lot I quickly tested it out with most of my search instances active on the frontend and the code seems to be working just as I expected 🙂
But I will make sure to run some other tests a week later to make sure that it is permanent solution before moving the code to live website.Have a great week.
January 15, 2021 at 5:50 am #31147You cannot access this content.January 15, 2021 at 10:36 am #31150Sure, I mean this feature, it has to be turned off: https://i.imgur.com/7IiAZXq.png
Best,
I see the code there, it actually does the thing, but because of that option it is not visible. Once you turned it off and cleared the cache it will be okay.
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
January 18, 2021 at 6:03 pm #31186Hi,
I didn’t get the chance to update you last week but the solution that you implemented on live site is working fine 🙂
Thanks a lot and have an amazing week. - AuthorPosts
You must be logged in to reply to this topic.