How to get posts by taxonomy term slug
-
Hi,
How can I fetch posts using the custom taxonomy term slug in the api call?
I have this in the json
pure_taxonomies: {
location: [
{
term_id: 44,
name: “Birmingham”,
slug: “birmingham”,
term_group: 0,
term_taxonomy_id: 44,
taxonomy: “location”,
description: “”,
parent: 29,
count: 1,
filter: “raw”
}
]
}I am trying with the following url ( movie is the custom post type)
mywebsite/wp-json/wp/v2/movie?pure_taxonomies.location.slug=birmingham
but it is not returning targeted posts, instead it fetches all posts.
Any help will be appreciated
Thanks
- The topic ‘How to get posts by taxonomy term slug’ is closed to new replies.