[wordpress插件] Ajax Load More: REST APIAjax加载更多:REST API

wordpress 插件 文章 2020-02-13 21:00 628 0 全屏看文

AI助手支持GPT4.0

评分

0

0

描述

The REST API extension will enable compatibility between Ajax Load More and the WP REST API plugin.

REST API扩展将实现Ajax Load More与WP REST API插件之间的兼容性。

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.

通过HTTP REST API轻松访问您的网站数据(作为JSON),并通过Ajax Load More的无限滚动之美显示结果。

https://connekthq.com/plugins/ajax-load-more/extensionsest-api/

https://connekthq.com/plugins/ajax-load-more/extensionsest-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.

REST API附加组件通过将标准Ajax Load More admin-ajax.php请求路由到API端点进行数据检索来工作。

The data is returned as JSON, then parsed and displayed using Underscore.js styled templates on the front-end of your website.

数据以JSON格式返回,然后使用网站前端的Underscore.js样式模板进行解析和显示。

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

使用一个简单的GET请求,一个JavaScript Repeater模板和一个专门为Ajax Load More开发的自定义终结点(/ wp-json / ajaxloadmore / posts),用户可以使用WP REST访问网站数据并无限滚动结果

API.

API。

View Example

查看示例

strong>

strong>

安装步骤

Uploading in WordPress Dashboard

在WordPress仪表板中上传

    1. Navigate to the ‘Add New’ in the plugins dashboard
    2. 导航至插件仪表板中的“添加新项”

    3. Navigate to the ‘Upload’ area
    4. 导航到“上传”区域

    5. Select ajax-load-more-rest-api.zip from your computer
    6. 从计算机中选择 ajax-load-more-rest-api.zip

    7. Click ‘Install Now’
    8. 点击“立即安装”

    9. Activate the plugin in the Plugin dashboard
    10. 在“插件”信息中心中激活插件

    Using FTP

    使用FTP

      1. Download ajax-load-more-rest-api.zip.
      2. 下载 ajax-load-more-rest-api.zip

      3. Extract the ajax-load-more-rest-api directory to your computer.
      4. ajax-load-more-rest-api 目录提取到您的计算机中。

      5. Upload the ajax-load-more-rest-api directory to the /wp-content/plugins/ directory.
      6. ajax-load-more-rest-api 目录上传到 / wp-content / plugins / 目录。

      7. Ensure Ajax Load More is installed prior to activating the plugin.
      8. 确保在激活插件之前已安装Ajax Load More。

      9. Activate the plugin in the WP plugin dashboard.
      10. 在WP插件仪表板中激活插件。

下载地址

https://downloads.wordpress.org/plugin/ajax-load-more-rest-api.zip

https://downloads.wordpress.org/plugin/ajax-load-more-rest-api.zip

-EOF-

AI助手支持GPT4.0