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?
- i need to resive data external api and show user
- Equivalent setup_postdata for Taxonomy Term?
- Transmit headers and footers via API from one site to another
- How to get list of custom taxonomies based on custom post type
- REST API And Error Codes – No Message
- Orderby taxonomy term id using get_posts not working
- WordPress custom taxonomies new/edit post autocomplete
- Searching JQuery arrays of taxonomy terms for word matches in frontend images upload
- Custom button on custom taxonomy listing page
- Custom Taxonomy Archives Page Errors
- Best Way to detect unique posts in wp rest api
- Templates files for custom post type with custom tags
- WP-API + JS Backbone client – how to update post meta
- Get user created Woocommerce attributes ( taxonomies ) [closed]
- Permalink structure not working with Custom Taxonomy (URL like ./taxonomy/category/postname)
- Custom Taxonomy user based creation
- Post not showing in my custom advanced search
- Error 404 in Custom taxonomy with pagination
- Custom taxonomy name not being translated in post manager page
- List active taxonomy terms
- add_rewrite_rule using custom taxonomy and year
- index.php Not Showing Custom Posts / Terms
- How to create a second set of tags that use the same slug or URL?
- How to add meta fields to custom taxonomy add/edit page?
- Custom Taxonomy Archive Page for Parents AND Children?
- Custom Tax Archive of Parents Only?
- Sort Taxonomy List by Custom Values
- How to filter a taxonomy meta field to the ‘single_term_title’ filter hook
- Custom taxonomy escaping html attr
- Custom taxonomy page template name and how to use it?
- Showing list of custom posts of a custom taxonomy
- Display taxonomy posts
- custom taxonomy not displaying
- Custom order of taxonomy using wp_get_object_terms and woocommerce_term_meta
- WordPress tag or archive php file customization
- customize taxonomy Page
- taxonomy query on front page
- Dynamic value for get_option linked to taxonomy term_id?
- Multisite custom taxonomy archive issues
- ajax drop down change second drop down data
- Redirect or Prevent Viewing of Custom Taxonomy’s Archives?
- Best Method to Switch Between Terms (Custom Taxonomy)