Ajax function is not working on WordPress

Try like this Main HTML: <form class=”home_footer” method=”post” id=”home_conct_form” action=””> <input type=”text” name=”fname” class=”txt” /> <input type=”text” name=”lname” class=”txt” /> <input type=”button” name=”home_submit” id=”home_submit” value=”Get In Touch”/> </form> Add on same page: <script> $(‘#home_submit’).click(function(){ var formData = $(“#home_conct_form”).serialize() $.ajax({ type: ‘POST’, url: ‘<?php echo home_url(“https://wordpress.stackexchange.com/”); ?>wp-admin/admin-ajax.php?action=footerFrm’, data: formData, beforeSend: function(){ $(‘.progloader’).show(); $(‘#home_submit’).hide(); }, success:function(data) { … Read more

Include HTML (Bootstrap Modal Box) with a plugin into my header

You only need the_content filter to add the modal, but bootstrap.js is needed to make it work. add_action(‘wp_enqueue_scripts’, array($this, ‘enqueue_bootstrap’); public function enqueue_bootstrap(){ wp_register_script( ‘bootstrap’, plugins_url( ‘your-plugin/assets/js/bootstrap.min.js’ ) ); wp_enqueue_script( ‘bootstrap’ ); } EDIT: You need to add $content argument to your function. As the codex says Note that the filter function must return the … Read more

How to override a plugins script

In principal, unless there are documented APIs and/or filters to the plugin, you should not do anything that is more then using core hooks if you want to be able to upgrade it in the future. If no appropriate thing is available, you should contact the author and ask for it, or decide that you … Read more

WordPress Active Plugins

I’d recommend https://en-gb.wordpress.org/plugins/p3-profiler/ to see what plugins are slowing you down. The only way to know which plugins you are not using would be to check if/where they are used and for what. You COULD deactivate one by one and make sure nothing breaks on the site. There is otherwise no other way of knowing … Read more