Multiple level category drop-down three levels is not working

Already was resolve my problem and the cause is because the component was created dinamically, the solution is use .on(“change”, instead .change(function(). I share the code of Ján Bočínec with the modification to use three dropdownlist or more. //Parent child con ajax function parent_child_cat_select() { ?> <script type=”text/javascript”> /* <![CDATA[ */ jQuery(document).ready(function() { //segundo drop … Read more

$ not defined using jQuery in WordPress

You can wrap your javascript inside a self-invoking function, then pass jQuery as an argument to it, using $ as the local variable name. For example: (function($) { $(document).ready(function(){ $(“ul.vimeo_desc_feed li a”).click(function(){ alert($(this).attr(‘href’)); return false; }) }); }(jQuery)); should work as intended. If I remember correctly the WP-supplied version of jQuery (the one you get … Read more

defined (‘ABSPATH’) false after AJAX post to other PHP-file

Follow these steps and you should be good to go:- Localize your script where you are implementing ajax(https://codex.wordpress.org/Function_Reference/wp_localize_script) Then make use of wp_ajax_{myfunction} (admin) and wp_ajax_nopriv_{myfunction} And lastly implement your code inside that function myfunction(){ /****Your code goes here*****/ } Eg. https://stackoverflow.com/questions/17855846/using-ajax-in-a-wordpress-plugin