Forbidden Error in ajax call with wordpress

Not sure why this error occur! you may follow this article Or you can review your code in following steps: Use wp_enqueue_scripts and wp_ajax_{action_name} wp_ajax_nopriv_{action_name} in your plugin file. Suppose my plugin name is test-plugin and my main plugin file name is test-plugin.php <?php /* Plugin Name: Test Plugin Plugin URI: http://wordpress.org Description: This just … Read more

URL issue retrieving Custom Post Types using Backbone JS API

Actually, you don’t have to extend the Post model (wp.api.models.Post) or Posts collection (wp.api.collections.Posts) because the documentation says: you will get new models and collections when you add REST API support to your custom post type And that means, your custom post type will be automatically added to the wp.api.models and wp.api.collections list, i.e. wp.api.models.<key> … Read more