You need to first register rest route for your custom taxonomy i.e. my_portfolio
add_filter( 'register_taxonomy_args', 'my_portfolio_taxonomy', 10, 2 );
function my_portfolio_taxonomy( $args, $taxonomy_name ) {
if ( 'my_portfolio' === $taxonomy_name ) {
$args['show_in_rest'] = true;
// Optionally customize the rest_base or rest_controller_class
$args['rest_base'] = 'my-portfolio';
$args['rest_controller_class'] = 'WP_REST_Terms_Controller';
}
return $args;
}
After that you can access url like : http://yourdomain.in/wp-json/wp/v2/posts?my-portfolio=28
Please note 28 is custom taxonomy id. you need to add id of photos in that case
Related Posts:
- WP REST API no longer supports filter param, so how do I get posts in a custom taxonomy?
- WP REST API – get custom taxonomies based on terms & filter
- Query WP REST API v2 by multiple meta keys
- How do I cache (core) API requests?
- WP REST API only returning partial list of users
- Is there a way to get protected meta fields through any of the available built-in WordPress APIs? (xmlrpc, wp-json)
- Retrieving pages with multiple tags using REST API
- How do I use the WP REST API plugin and the OAuth Server plugin to allow for registration and login?
- WP API : date_query parameter
- Create taxonomy with meta term using the WP Rest Api
- register_rest_field for custom taxonomy fields that are assosiated with custom post type
- Get more than 10 posts in a specific category with the wordpress api
- Add Category Name to REST API
- Display sub-taxonomies based on SELECTED parent-taxonomy
- Create post with REST API in php with file_get_contents
- WordPress REST API “rest_authentication_errors” doesn’t work external queries?
- node-wpapi: how to handle authentication?
- Get all tags not just first 10 with wp api 2.0
- WP REST API – Limit the taxonomy search to the first letter
- How to add WP API and JS featured image attachment
- WP_REMOTE_POST Requests are being blocked by API provider [closed]
- Custom Taxonomy in REST API
- Woocommerce api: create product with images – bad request
- Adding custom end points, No error line
- Retrieving an intersection of two terms from two different custom taxonomies via API
- How to edit feature image with XML RPC?
- how does the wordpress rest API work
- Get a remote post ID via API given URL
- How to change the date and time in REST API for comments?
- How to see posts in taxonomy endpoint
- Creating a WordPress Post via REST API – HTML or Markdown?
- Custom REST endpoint not working to retrieve single posts (“rest_no_route”)
- Getting taxonomies associated with a specified post type
- WP REST API and Access-Control-Allow-Origin
- Save values generated via API as taxonomy terms
- Displaying the post count of all custom taxonomy terms in a list format
- Terms added to custom taxonomy for custom post type only appear in Rest when added in code
- How to display relations via wordpress Rest API
- Allow REST API Endpoint to specific user and hide from public
- Escape commas in REST API
- register/login api
- WordPress REST API in Integromat: How to overcome “Sorry, you are not allowed to list users / edit this…”
- How do i post data to url with fields?
- Help to create the best plugin settings!
- Remove unwanted fields from WP API response
- WordPress API “code”:”rest_no_route” with Custom Route
- Adding Amchart Interface to WordPress API
- Deleting media using the WordPress Rest API
- How to get all the terms from a custom hierarchical taxonomy via REST api?
- how to show product custom taxonomies in woocommerce rest api
- Extending the API I created to return category names
- how to filter the data’s comparison operators (>= &
- Extra fields on categories that is available via the WP-API?
- How to update WordPress Plugins in your own maintance application?
- External api call using wordpress
- Adding Microsoft Teams Incoming Webhook to WordPress, Problem with Rest Route?
- Woocommerce API for calling products by Category ID
- How to submit a button automatically after every scheduled hours?
- Is ACF being a honey trap? [closed]
- Does the REST API (official) support custom post types?
- Using a different template per Custom Taxonomies for single term archive pages
- How can I display all post IDs from the taxonomy?
- Keep taxonomy base name in post permalinks
- get_terms: determine if taxonomy term has children
- Is it acceptable to build functionality into a theme built for a client? [closed]
- “show option all” on list categories doesn’t display taxonomy
- get_term_children returns WP_Error for custom taxonomy
- Same taxonomy for different object types
- Enable the admin to sort custom taxonomy
- Translating a custom taxonomy
- Show all post of taxonomy on base taxonomy URL
- Taxonomies for custom post types
- Taxonomies image
- No ‘Access-Control-Allow-Origin’ when call rest API
- Calling an API to do authentication / user login
- Redirect on saving term at custom taxnomy
- Pagination on Custom Tax Pages Removes Spaces from Query Vars
- Getting a Page via its post-name using WP REST API v2 and Postman
- Using WP_Query and Query_post for the loop?
- Multiple Custom Taxonomy Dropdowns Lists
- Double slash in the_terms URL
- Using custom taxonomy when registering a new custom post type
- How to call a custom taxonomy term name inside a function?
- Saving custom taxonomies to post as checkbox on frontend
- Where to find relation of custom post type category with it thubmnail image in wordpress database
- Add taxonomy column with meta field (ACF) content
- Warning: Undefined variable $post in C:\xampp\htdocs\… after PHP upgrade
- How to display taxonomy terms in a dropdown on a user edit page
- Do i need to use a plugin for third party api integration?
- How to appear plural or singular custom taxonomy name(-s) inside woocommerce single product meta php file
- Filter Tags for current users
- How can I rewrite a custom taxonomy archive slug
- WordPress REST API Endpoint (Authors and Categories latest posts)
- Searching JQuery arrays of taxonomy terms for word matches in frontend images upload
- Order posts with custom taxonomy array
- How can i set post_per_page in my taxonamy?
- register_taxonomy – show in admin menu, but not on post type (edit) screen
- Advanced WordPress search form based on custom taxonomy and custom meta value
- WordPress API standard compliance and specification for external database [closed]
- Child terms with improper parent in the url should redirect to 404