Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › A Quick help is needed
This topic contains 53 replies, has 2 voices, and was last updated by daro201370 2 years, 7 months ago.
- AuthorPosts
- August 18, 2021 at 2:38 pm #34305You cannot access this content.August 18, 2021 at 3:14 pm #34306
Sure!
Can you please add temporary access and FTP details? I want to make sure this is not related to the plugin somehow. When the override is inactive, it should not affect anything at all, it is only a simple redirection to the results page, so it should not cause any issues whatsoever.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
August 19, 2021 at 9:44 am #34309You cannot access this content.August 19, 2021 at 10:04 am #34310Thanks Thon!
It seem to work all right on that site, when I disable the search override feature, so this might be related to something else as well unfortunately.
One last thing you can try on the live site via a custom code:
add_action('wp_footer', 'wp_footer_asp_custom_redirect', 9999); function wp_footer_asp_custom_redirect() { ?> <script> (function($){ let url = 'https://www.khmeradverts.com/'; $('input.orig').on('keydown', function(e){ let keycode = e.keyCode || e.which; if ( keycode == 13 ) { e.preventDefault(); e.stopPropagation(); location.href = url + '?s=' + $(this).val() + '&category=&location=&a=true'; } }); $('.promagnifier').on('click touchstart', function(e){ e.preventDefault(); e.stopPropagation(); location.href = url + '?s=' + $(this).closest('.asp_m').find('input.orig').val() + '&category=&location=&a=true'; }); })(jQuery); </script> <?php }
This will completely prevent any return key or input actions when doing the search, and only does a redirection there. Try adding this code to the functions.php file in your theme/child theme directory – make sure to have a full server back-up first for safety. For more details you can check the safe coding guidelines.
If this does not work, then there is something else conflicting there.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
August 19, 2021 at 10:30 am #34311You cannot access this content.August 19, 2021 at 11:21 am #34312It should work for sure. I can not see the custom code however in the page source – make sure to clear all layers of cache so it is populated to the front-end.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
August 19, 2021 at 11:50 am #34313You cannot access this content.August 19, 2021 at 11:54 am #34314You cannot access this content. Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
August 19, 2021 at 1:18 pm #34315You cannot access this content.August 19, 2021 at 1:34 pm #34316You cannot access this content. Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
August 19, 2021 at 3:07 pm #34317You cannot access this content.August 19, 2021 at 3:48 pm #34318You cannot access this content. Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
August 20, 2021 at 12:28 am #34319You cannot access this content.August 20, 2021 at 8:55 am #34320Can you try now? I made the direct modification via the admin panel. The working code is:
Best,add_action('wp_footer', 'wp_footer_asp_custom_redirect', 9999); function wp_footer_asp_custom_redirect() { ?> <script> (function($){ let url = 'https://mwqh53re.club/'; function reattach() { $('input.orig').off(); $('input.orig').on('keydown', function(e){ let keycode = e.keyCode || e.which; if ( keycode == 13 ) { e.preventDefault(); e.stopPropagation(); location.href = url + '?s=' + $(this).val() + '&category=&location=&a=true'; } }); $('.promagnifier').off(); $('.promagnifier').on('click touchstart', function(e){ e.preventDefault(); e.stopPropagation(); location.href = url + '?s=' + $(this).closest('.asp_m').find('input.orig').val() + '&category=&location=&a=true'; }); } reattach(); setTimeout(function(){ reattach(); }, 100); setTimeout(function(){ reattach(); }, 1000); })(jQuery); </script> <?php }
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
August 20, 2021 at 12:34 pm #34322You cannot access this content. - AuthorPosts
You must be logged in to reply to this topic.