A Quick help is needed

This topic contains 53 replies, has 2 voices, and was last updated by daro201370 daro201370 2 years, 7 months ago.

Viewing 15 posts - 31 through 45 (of 54 total)
  • Author
    Posts
  • #34305
    daro201370
    daro201370
    Participant
    You cannot access this content.
    #34306
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    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 :)


    #34309
    daro201370
    daro201370
    Participant
    You cannot access this content.
    #34310
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Thanks 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 :)


    #34311
    daro201370
    daro201370
    Participant
    You cannot access this content.
    #34312
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    It 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 :)


    #34313
    daro201370
    daro201370
    Participant
    You cannot access this content.
    #34314
    Ernest Marcinko
    Ernest Marcinko
    Keymaster
    You cannot access this content. Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #34315
    daro201370
    daro201370
    Participant
    You cannot access this content.
    #34316
    Ernest Marcinko
    Ernest Marcinko
    Keymaster
    You cannot access this content. Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #34317
    daro201370
    daro201370
    Participant
    You cannot access this content.
    #34318
    Ernest Marcinko
    Ernest Marcinko
    Keymaster
    You cannot access this content. Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #34319
    daro201370
    daro201370
    Participant
    You cannot access this content.
    #34320
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Can you try now? I made the direct modification via the admin panel. The working code is:

    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
    }
    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #34322
    daro201370
    daro201370
    Participant
    You cannot access this content.
Viewing 15 posts - 31 through 45 (of 54 total)

You must be logged in to reply to this topic.