Hey guys,
Had the same task. Done it with a plugin which provides php execution in pages and posts.
See this article on my website with the code. It’s in german though, but google should be able to translate it good enough.
Whats really interesting for you is the Code box in chapter 1.1.
You can copy that and give it a go if you want.
Just make sure you have the plugin called Allow PHP in Posts and Pages installed and paste the code between the tags [php] and [/php].
Thats it.
Result is here: https://www.rustystrings.eu
Good luck. Rob