Best way to load WordPress Bootstrap
Requiring a file using relative path is never a good idea, that because wp content folder can be easily changed and that make your code fail. You should convert your file into a MU plugin (you only need to save it wp-content/mu-plugins folder) and change it to something like: add_action( ‘wp_ajax_super_custom_stuff’, ‘my_super_custom_stuff’ ); add_action( ‘wp_ajax_nopriv_super_custom_stuff’, … Read more