This plugin detects Ajax requests and returns just the formatted body of the post or page.
- Unzip plugin and upload the betancourt-ajax-content directory to your blog’s wp-content/plugins directory.
- Activate the plugin through the Plugins menu in WordPress.
- That’s it. Now you can request a post via Ajax. The response will be clean HTML containing the text of the post.
Alternatively you can test this quickly using cURL. Try the following from the command line:
curl http://your.domain.name/your-content-slug/ -H X-Requested-With:XMLHttpRequest
Please visit the forum for questions or comments: https://wordpress.org/tags/ajax-content-renderer/
Contributors & Developers
“Ajax Content Renderer” is open source software. The following people have contributed to this plugin.Contributors
Interested in development?
- Minor change to evaluation of XHR headers. Avoids PHP warnings.
- Tested against WP 3.1.2
Updated documentation and added link to sample implementation.
Upgrade to avoid PHP warnings.
Cleaned up code.
Fixed bug reported by zulien on 30-Jun-2011. The plugin was only supporting single pages. It now supports single posts, pages and multi-post homepages.
- Tested on WordPress 3.5.1
- Updated installation instructions.
Corrected error in changelog.
Tested against WordPress 3.9
Incorporated change submitted by Seb33300 to avoid disabling the Media listings in WP Admin.