fmedinac / wp-rest-api-permalink

Adds a permalink parameter to WP REST API for getting nested pages using their permalink.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

wp-rest-api-permalink

It adds the possibility of using permalink as query string on WP REST API requests.

The main purpose of this is to get/filter pages using their permalinks. Different from slug, it can be used for nested pages.

Usage

fetch( 'https://example.com/wp-json/wp/v2/pages?permalink=team/about');
fetch( 'https://example.com/wp-json/wp/v2/pages?permalink=company/about');

About

Adds a permalink parameter to WP REST API for getting nested pages using their permalink.

License:MIT License


Languages

Language:PHP 100.0%