How to get dynamically custom post type that are under a certain category

Question

I have a scusto post type for a theme I’m developing that is named products where I will save a catalogue of products. I want to categorize these products, I’ve added the taxonomy category to the post type and I will create the categories needed to assign each post to the correct one. I’m not very informed about wordpress functions, I want to ask how I can get my custom post type that are assigned to each category. I’m thinking to do multiple WP_Query() but I don’t think this will be a good idea for performances. Is there another way? The solution I want to implement is using ajax with vue.js with the REST API to have a category list that when clicked will load the relative posts and the category name, description. Any hepl?

0
, , sialfa 3 years 2020-04-03T12:52:07-05:00 0 Answers 71 views 0

Leave an answer

Browse
Browse