Using Single REST API Endpoint for Multiple Post Types
Learn to modify the custom search route to work with multiple post types.
In the last lesson, we created a custom query to fetch posts of teacher post type and returned them on the custom REST API endpoint. The school_search_results
function is reproduced below:
Get hands-on with 1400+ tech skills courses.