Hi,
Im trying to do the same. You got this working??
I was try this code put first part in my template functions.php and secound part in post with shortcode snippet.
I get this error
The page can’t be found.
It looks like nothing was found at this location.