Can’t load search results with ajax
The JavaScript should be: <script> jQuery( document ).ready(function ( $ ) { $( “#searchform” ).on( “submit”, function ( ev ) { ev.preventDefault(); $.post( “<?php echo admin_url( ‘admin-ajax.php’ ) ?>”, { action: “wpa56343_search”, search: $( “#s” ).val() }, function ( response ) { $( “body” ).append( response ); } ); }); }); </script> And the AJAX … Read more