WordPress Rest Api Custom End point. I guess it because you used d metacharacter for regex (?P
register_rest_route( 'wp/v2', '/guestmix/(?P<slug>\S+)', array(
'methods' => 'GET',
'callback' => 'get_guestmix'
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.