內容簡介
在 WordPress 4.7 中,文章不能根據 modified, modified_gmt, date_gmt 字段進行篩選。
透過使用此外掛,我們可以指定欄位(其中任何一個在 date、date_gmt、modified 或 modified_gmt 中),作為 date_query_column 查詢參數,以對在 before 及/或 after 查詢參數中提供的值進行查詢。
使用方法
在任何文章端點上(例如 /wp/v2/posts 或 /wp/v2/pages)結合 before 及/或 after 參數使用 date_query_column 參數。
/wp-json/wp/v2/posts?after=2017-11-08T13:07:09&date_query_column=modified
外掛標籤
開發者團隊
② 後台搜尋「WP REST API – Filter posts date wise using given column」→ 直接安裝(推薦)
📦 歷史版本下載
原文外掛簡介
In WordPress 4.7, Posts cannot be filtered based on modified, modified_gmt, date_gmt fields.
Using this plugin we can specify the column(any of date, date_gmt, modified, modified_gmt) as query parameter date_query_column to query against value(s) given in before and/or after query parameters.
Usage
Use the date_query_column parameter on any post endpoint such as /wp/v2/posts or /wp/v2/pages in combination with before and/or after parameter.
/wp-json/wp/v2/posts?after=2017-11-08T13:07:09&date_query_column=modified
