Skip to content

felixarntz/wp-api-json-feed

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

WordPress plugin WordPress Build Status Code Climate Test Coverage Latest Stable Version License

WP-API JSON Feed

Implements a JSON feed following the version 1 spec by means of a REST API endpoint.

Features

  • Adds JSON feeds following the official version 1 spec.
  • Places a link tag to the posts feed inside the HTML head tag.
  • Adds a new namespace feed/v1 to the REST API.
  • Allows adding individual endpoints per post type, simply by specifying an additional argument when registering the post type. By default a feed is only added for regular posts (posts of the post post type).
  • Uses a proper REST API controller including schema for the endpoints.
  • Contains several filters to modify the feed responses as necessary.

Installation and Setup

You can download the latest version from the WordPress plugin repository or directly from your WordPress backend.

Once the plugin is activated, it will work out of the box and provide a JSON feed for posts. If you want to provide JSON feeds for further post types, you need to specify an additional argument show_json_feed when registering the post type, and set it to a boolean true. You may also specify a json_feed_base argument being a string identifier that should be used in the feed URL. If no string identifier is provided, the post type slug will be used.

Contributions and Bugs

If you have ideas on how to improve the plugin or if you discover a bug, I would appreciate if you shared them with me, right here on Github. In either case, please open a new issue here!

You can also contribute to the plugin by translating it. Simply visit translate.wordpress.org to get started.

About

Implements a JSON feed following the version 1 spec by means of a REST API endpoint.

Resources

License

Stars

Watchers

Forks

Packages

No packages published