A Quick help is needed

This topic contains 53 replies, has 2 voices, and was last updated by daro201370 daro201370 1 year, 9 months ago.

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

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

    Best,
    Ernest Marcinko

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


    #34325
    daro201370
    daro201370
    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
    daro201370
    daro201370
    Participant
    You cannot access this content.
    #34329
    Ernest Marcinko
    Ernest 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.

    Best,
    Ernest Marcinko

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


    #34332
    daro201370
    daro201370
    Participant
    You cannot access this content.
    #34336
    Ernest Marcinko
    Ernest 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.

    Best,
    Ernest Marcinko

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


    #34343
    daro201370
    daro201370
    Participant
    You cannot access this content.
    #34346
    Ernest Marcinko
    Ernest 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.

    Best,
    Ernest Marcinko

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


    #34352
    daro201370
    daro201370
    Participant

    Many thanks
    Thon

Viewing 9 posts - 46 through 54 (of 54 total)

You must be logged in to reply to this topic.