AJAX call – failling to call do_action

Aside from @Tareq answer (which is your main problem), you should wp_register_script and the wp_enqueue_script load your local copy of jQuery instead of the one from Google CDN localize your script using wp_localize_script

add_filter doesn’t work

register_activation_hook and register_deactivation_hook refer to when the plugin is activated and deactivated, respectively, and only fire in those two instances. They’re to be used, for example, when you need to add a database table (and take it back down). You don’t need to remove your filters, either. Your plugin can just be shortened to: function … Read more

Install and Update plugins on a VPS WordPress installation

Sorry for posting the question above, I fixed it right after posting here, by following these steps I found on this site http://artofsimplicity.co.uk/wordpress-ftp-auto-upgrade-on-ubuntu sudo apt-get install vsftpd sudo useradd wordpress sudo passwd wordpress # set password for wordpress when prompted. sudo usermod -g www-data wordpress sudo chmod -R g+w /var/www sudo chown -R www-data:www-data /var/www … Read more

How to install plugin only from PHP file?

Your plugin isn’t visible because you haven’t provided a Plugin Name in your header. Change Name to Plugin Name and it’ll show up. You’re also missing a few lines in your header, if that’s a concern to you. It’s best to just follow the example provided in the codex: <?php /** * Plugin Name: Name … Read more

Proper way to replace the_content only for pages created by custom plugin

You need to return the filtered content, try like this: add_filter(‘the_content’, ’emd_content’); function emd_content( $content ) { if ( is_page(‘Member Directory’) ) { include dirname( __FILE__ ) . ‘/content-members.php’; } elseif ( is_page(‘Contact Members’) ) { include dirname( __FILE__ ) . ‘/content-member-contact-form.php’; } else { return $content; } } But the better way is to … Read more

Integrating jQuery Datatables with Editor into wordpress admin

Both DataTables Editor and WordPress are trying to use the same reserved parameter, ‘action’. WordPress is using $_REQUEST[‘action’] to route the request in admin-ajax.php line 86. DataTables Editor is using $_POST[‘action’] to tell the server-side processing script what action to apply ( insert / delete / update – see: https://editor.datatables.net/manual/server ) This would work fine … Read more