A case for Hierarchical Custom Posts
A case for Hierarchical Custom Posts
A case for Hierarchical Custom Posts
add_rewrite_endpoint returns 404 on archives
Manage custom post type in woocommerce /my-account/ page
Using WP-API and SSE not authenticating user ID
Custom endpoint to get all custom taxonomy terms
WordPress Rest API custom endpoint for RSS feed
How to force JWT auth for default GET endpoints of WordPress rest api?
WP Remote Request not returning all of content via request
This is how I solved similar issue using validate callback – this is the part of code where bar argument is defined: ‘bar’ => array( ‘default’ => FALSE, ‘validate_callback’ => function($param, $request, $key) { if ($request[‘foo’] == 3) return ($param !== FALSE); return FALSE; } ), The default parameter causes call of validate callback even … Read more
I think you should stop using rewrite endpoints to handle JSON responses. Instead you can and you should use the REST API. So, instead of this: function makeplugins_add_json_endpoint() { add_rewrite_endpoint( ‘json’, EP_PERMALINK | EP_PAGES ); } add_action( ‘init’, ‘makeplugins_add_json_endpoint’ ); And then handle the JSON response at your own, you can and you should do … Read more