I want to get data in wpApi in url i am using search like this
https://www.digitemb.com/wp-json/wp/v2/posts?_embed&?filter[order]=DESC&filter[posts_per_page]=5&search=digitize&page=1
My Question is that How do i get posts data from specific categories. i don't want to get data of all categories i use this logic to
search(keyword,id){
return this.http.get("https://www.digitemb.com/wp-json/wp/v2/posts?_embed&?filter[order]=DESC&filter[posts_per_page]=5&search=" + keyword + "&page="+id)
.map(data => data.json());
}
but this data can get all categories i want specific categories posts !
Use the ID of the category to get back all posts from that category.
List of available arguments - https://developer.wordpress.org/rest-api/reference/posts/#arguments