{"id":69077,"date":"2017-05-22T23:38:29","date_gmt":"2017-05-22T23:38:29","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/wp-api-json-feed\/"},"modified":"2025-11-24T23:33:04","modified_gmt":"2025-11-24T23:33:04","slug":"wp-api-json-feed","status":"publish","type":"plugin","link":"https:\/\/test.wordpress.org\/plugins\/wp-api-json-feed\/","author":10972453,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.1.0","stable_tag":"1.1.0","tested":"6.9.4","requires":"5.4","requires_php":"5.6","requires_plugins":null,"header_name":"WP-API JSON Feed","header_author":"Felix Arntz","header_description":"Implements a JSON feed following the version 1 spec by means of a REST API endpoint.","assets_banners_color":"78c8e6","last_updated":"2025-11-24 23:33:04","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/felix-arntz.me\/wordpress-plugins\/","header_plugin_uri":"https:\/\/wordpress.org\/plugins\/wp-api-json-feed\/","header_author_uri":"https:\/\/felix-arntz.me","rating":0,"author_block_rating":0,"active_installs":40,"downloads":4287,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.0":{"tag":"1.0.0","author":"flixos90","date":"2017-05-22 23:38:13"},"1.1.0":{"tag":"1.1.0","author":"flixos90","date":"2025-11-24 23:33:04"}},"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":0},"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":2982096,"resolution":"128x128","location":"assets","locale":""},"icon-256x256.png":{"filename":"icon-256x256.png","revision":2982096,"resolution":"256x256","location":"assets","locale":""}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":2982096,"resolution":"1544x500","location":"assets","locale":""},"banner-772x250.png":{"filename":"banner-772x250.png","revision":2982096,"resolution":"772x250","location":"assets","locale":""}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.0","1.1.0"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":2982096,"resolution":"1","location":"assets","locale":""}},"screenshots":{"1":"Example JSON feed response generated by the plugin"},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[252,141452,23853],"plugin_category":[],"plugin_contributors":[78709],"plugin_business_model":[],"class_list":["post-69077","plugin","type-plugin","status-publish","hentry","plugin_tags-feed","plugin_tags-json-feed","plugin_tags-rest-api","plugin_contributors-flixos90","plugin_committers-flixos90","plugin_support_reps-flixos90"],"banners":{"banner":"https:\/\/ps.w.org\/wp-api-json-feed\/assets\/banner-772x250.png?rev=2982096","banner_2x":"https:\/\/ps.w.org\/wp-api-json-feed\/assets\/banner-1544x500.png?rev=2982096","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/wp-api-json-feed\/assets\/icon-128x128.png?rev=2982096","icon_2x":"https:\/\/ps.w.org\/wp-api-json-feed\/assets\/icon-256x256.png?rev=2982096","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/wp-api-json-feed\/assets\/screenshot-1.png?rev=2982096","caption":"Example JSON feed response generated by the plugin"}],"raw_content":"<!--section=description-->\n<p>Implements JSON feeds following the official JSON feed specification by using the WordPress REST API. By default, only a JSON feed for regular posts is added. This can be easily customized to also provide JSON feeds for e.g. certain custom post types.<\/p>\n\n<ul>\n<li>Adds JSON feeds following the official <a href=\"https:\/\/jsonfeed.org\/version\/1.1\">version 1.1 spec<\/a>.<\/li>\n<li>Adds a JSON feed for posts to the REST API by default (e.g. at <code>\/wp-json\/feed\/v1\/posts<\/code>).<\/li>\n<li>Allows adding JSON feeds for other post types by using a <code>show_json_feed<\/code> argument when registering the post type.<\/li>\n<li>Places a link tag to the current feed inside the HTML head tag.<\/li>\n<li>Maintains backward compatibility with the previous JSON feed <a href=\"https:\/\/www.jsonfeed.org\/version\/1\/\">version 1 spec<\/a>.<\/li>\n<li>Contains extensive filters to modify the feed responses as necessary.<\/li>\n<\/ul>\n\n<!--section=installation-->\n<ol>\n<li>Upload the entire <code>wp-api-json-feed<\/code> folder to the <code>\/wp-content\/plugins\/<\/code> directory or download it through the WordPress backend.<\/li>\n<li>Activate the plugin through the 'Plugins' menu in WordPress.<\/li>\n<\/ol>\n\n<h4>Administration<\/h4>\n\n<p>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 <code>show_json_feed<\/code> when registering the post type, and set it to a boolean <code>true<\/code>. You may also specify a <code>json_feed_base<\/code> 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.<\/p>\n\n<!--section=faq-->\n<dl>\n<dt id='how%20can%20i%20add%20a%20feed%20for%20my%20custom%20post%20type%3F'><h3>How can I add a feed for my custom post type?<\/h3><\/dt>\n<dd><p>To provide a JSON feed for your custom post type, you need to specify an additional argument <code>show_json_feed<\/code> when registering the post type, and set it to a boolean <code>true<\/code>. You may optionally specify a <code>json_feed_base<\/code> 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.<\/p>\n\n<p>Here is an example, supporting a JSON feed for a custom post type \"article\" and setting its feed base to \"articles\" so that the feed will appear at <code>{restURL}\/feed\/v1\/articles<\/code>.<\/p>\n\n<pre><code>&lt;?php\n\nadd_filter(\n    'register_post_type_args',\n    function ( $args, $post_type ) {\n        if ( 'article' === $post_type ) {\n            $args['show_json_feed'] = true;\n            $args['json_feed_base'] = 'articles';\n        }\n        return $args;\n    },\n    10,\n    2\n);\n<\/code><\/pre><\/dd>\n<dt id='why%20does%20the%20json%20feed%20contain%20fields%20which%20are%20not%20part%20of%20the%20schema%3F'><h3>Why does the JSON feed contain fields which are not part of the schema?<\/h3><\/dt>\n<dd><p>Since the JSON feed schema is always future compatible, by default the plugin preserves backward compatibility with older JSON feed readers by maintaining deprecated fields such as <code>author<\/code>. You can skip this backward compatibility behavior by using the <code>wp_api_json_feed_skip_backward_compatibility<\/code> filter and returning <code>true<\/code>.<\/p><\/dd>\n<dt id='where%20should%20i%20submit%20my%20support%20request%3F'><h3>Where should I submit my support request?<\/h3><\/dt>\n<dd><p>For regular support requests, please use the <a href=\"https:\/\/wordpress.org\/support\/plugin\/wp-api-json-feed\">wordpress.org support forums<\/a>. If you have a technical issue with the plugin where you already have more insight on how to fix it, you can also <a href=\"https:\/\/github.com\/felixarntz\/wp-api-json-feed\/issues\">open an issue on GitHub instead<\/a>.<\/p><\/dd>\n<dt id='how%20can%20i%20contribute%20to%20the%20plugin%3F'><h3>How can I contribute to the plugin?<\/h3><\/dt>\n<dd><p>If you have ideas to improve the plugin or to solve a bug, feel free to raise an issue or submit a pull request in the <a href=\"https:\/\/github.com\/felixarntz\/wp-api-json-feed\">GitHub repository for the plugin<\/a>. Please stick to the <a href=\"https:\/\/github.com\/felixarntz\/wp-api-json-feed\/blob\/main\/CONTRIBUTING.md\">contributing guidelines<\/a>.<\/p>\n\n<p>You can also contribute to the plugin by translating it. Simply visit <a href=\"https:\/\/translate.wordpress.org\/projects\/wp-plugins\/wp-api-json-feed\">translate.wordpress.org<\/a> to get started.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.1.0<\/h4>\n\n<ul>\n<li>Added: Add support for the <a href=\"https:\/\/jsonfeed.org\/version\/1.1\">JSON feed 1.1 spec<\/a>.<\/li>\n<li>Added: Introduce filter <code>wp_api_json_feed_skip_backward_compatibility<\/code> to optionally skip JSON feed fields included for backward compatibility with <a href=\"https:\/\/jsonfeed.org\/version\/1\">JSON feed 1.0 spec<\/a>.<\/li>\n<li>Enhanced: Include a <code>&lt;link&gt;<\/code> tag for the most relevant JSON feed based on the current content, in addition to the general posts JSON feed.<\/li>\n<li>Enhanced: Include a <code>user_comment<\/code> field in the JSON feeds.<\/li>\n<li>Tweaked: Bump the minimum required WordPress and PHP versions.<\/li>\n<li>Tweaked: Use modern test infrastructure including revised PHPUnit tests, and GitHub Actions to ensure long-term stability.<\/li>\n<li>Fixed: Remove unnecessary call to <code>load_plugin_textdomain()<\/code>.<\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>First stable version<\/li>\n<\/ul>","raw_excerpt":"Implements JSON feeds following the official JSON feed specification by using the WordPress REST API.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/test.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/69077","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/test.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/test.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/test.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=69077"}],"author":[{"embeddable":true,"href":"https:\/\/test.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/flixos90"}],"wp:attachment":[{"href":"https:\/\/test.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=69077"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/test.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=69077"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/test.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=69077"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/test.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=69077"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/test.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=69077"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/test.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=69077"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}