Ajax Load More: REST API
The REST API extension will enable compatibility between Ajax Load More and the WP REST API plugin. Easily access your website data (as JSON) through an HTTP REST API and display the results using the beauty of infinite scrolling with Ajax Load More. https://connekthq.com/plugins/ajax-load-more/exte
About this tool.
The REST API extension will enable compatibility between Ajax Load More and the WP REST API plugin.
Easily access your website data (as JSON) through an HTTP REST API and display the results using the beauty of infinite scrolling with Ajax Load More.
https://connekthq.com/plugins/ajax-load-more/extensions/rest-api/
How It Works
The REST API add-on works by routing the standard Ajax Load More admin-ajax.php requests through to API endpoints for data retrieval. The data is returned as JSON, then parsed and displayed using Underscore.js styled templates on the front-end of your website.
Using a simple GET request, a JavaScript Repeater Template and a custom endpoint (/wp-json/ajaxloadmore/posts) developed specifically for Ajax Load More, users are able to access website data and infinite scroll the results using the WP REST API.
View Example
Getting started.
Uploading in WordPress Dashboard
- 01Navigate to the ‘Add New’ in the plugins dashboard
- 02Navigate to the ‘Upload’ area
- 03Select ajax-load-more-rest-api.zip from your computer
- 04Click ‘Install Now’
- 05Activate the plugin in the Plugin dashboard
Using FTP
- 06Download ajax-load-more-rest-api.zip .
- 07Extract the ajax-load-more-rest-api directory to your computer.
- 08Upload the ajax-load-more-rest-api directory to the /wp-content/plugins/ directory.
- 09Ensure Ajax Load More is installed prior to activating the plugin.
- 10Activate the plugin in the WP plugin dashboard.
Frequently asked questions.
What is a Namespace in an API endpoint?
Namespaces are the first part of the URL for the endpoint. Namespaces allows for two plugins to add a route of the same name, with different functionality.
Need more info? Read the official documentation on Namespacing. http://v2.wp-api.org/extending/adding/#namespacing