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

A Quick help is needed

Viewing 9 posts - 46 through 54 (of 54 total)
  • Author
    Posts
  • #34323
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Indeed. I made an adjustment, can you try now?

    #34325
    daro201370daro201370
    Participant

    Update: When I change ASP to Compact box, it stops working.

    Can you please check it on dev site:

    https://mwqh53re.club/

    Thanks
    Thon

    #34328
    daro201370daro201370
    Participant

    You cannot access this content.

    #34329
    Ernest MarcinkoErnest Marcinko
    Keymaster

    I assume you don’t want the redirection on the magnifier click, for using the compact mode. I removed that section, you can try now.

    #34332
    daro201370daro201370
    Participant

    You cannot access this content.

    #34336
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi Thon,

    Well, you can use the same settings on the live as you used before, the code should be this one:

    add_action('wp_footer', 'wp_footer_asp_custom_redirect', 9999);
    function wp_footer_asp_custom_redirect() {
    	?>
    	<script>
    	(function($){
    		let url = 'https://www.khmeradverts.com/';
    		
    		function reattach() {
    			$('input.orig').off('keydown').off('keyup');
    			$('input.orig').on('keydown', function(e){
    				let keycode =  e.keyCode || e.which;
    				if ( keycode == 13 ) {
    					e.preventDefault();
    					e.stopImmediatePropagation();
    					e.stopPropagation();
    					location.href = url + '?s=' + $(this).val() + '&category=&location=&a=true';
    				}
    			});
    		}
    		reattach();
    		setTimeout(function(){
    			reattach();
    		}, 100);
    		setTimeout(function(){
    			reattach();
    		}, 300);
    		setTimeout(function(){
    			reattach();
    		}, 1000);
    	})(jQuery);
    	</script>
    	<?php
    }

    And then it should be all right there as well.

    #34343
    daro201370daro201370
    Participant

    You cannot access this content.

    #34346
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Yes, it is the same, the difference is the URL.
    This code should work even after an update, you don’t have to worry about that.

    #34352
    daro201370daro201370
    Participant

    Many thanks
    Thon

Viewing 9 posts - 46 through 54 (of 54 total)
  • You must be logged in to reply to this topic.