admin-ajax.php 400 (Bad Request) what am I doing wrong?

You’re declaring the AJAX handler inside the shortcode handler. That’s not going to work: admin AJAX requests aren’t processed in the context of a page, so the shortcode won’t be run, so the handler won’t be set up. You’ll need to move the function definition and add_actions out to the top level, not inside wpcode_elementor_shortcode. … Read more

contact form 7 form not working in admin panel

The action wp_enqueue_scripts action hook is only on the frontend: try changing this to admin_enqueue_scripts for the admin (untested): add_action( ‘admin_enqueue_scripts’, ‘cf7_script_and_style’ ); Edit: After looking at the definition for wpcf7_enqueue_scripts(), it turns out that CF7 doesn’t anticipate being loaded in the admin: who would’ve guessed. You’ll need to copy a lot of that file … Read more

wordpress filter for searching categories with ajax not working

If I’m understanding this correctly, the issue seems to lie in the HTML form action attribute, where you’re posting to admin-ajax.php. Because of this, your page is being redirected to that URL. Instead, you should prevent the form submission from redirecting the page by using JavaScript. Your JavaScript code should be like: <script> jQuery(function($){ $(‘#filter’).on(‘submit’, … Read more

WordPress send Ajax where click button

@sergio Here is the working answer you can check if there is still any issue paste it here and it if it works well you can upvote the answer to help others. The issue it when you click button your $(this).prop(‘files’)[0] is not working because not this scope to the button element. $(‘body’).on(‘click’, ‘#enviar_fichero’, function() … Read more

error code: 523