You could parse the URL placing the ‘name’ into a variable and check that ‘name’ for acceptable names from a list… else that would be subject to abuse. In the meantime, you’ll pass the ‘accepted variable’ on to WordPress to be handled by a function.
And you’ll need to pass all that back then if ‘no match’ for WordPress to deal with.
The cool thing would be…
Asking Dave, ‘Dave? Will I dream?’
And when Ken or Kenneth shows up, ‘What’s the Frequency, Kenneth?’
Then there’s, ‘Greetings Professor Falken… Shall we play a game?’
Use your imagination…
It might be better to set a cookie as a response to a ‘What is your first name?’ query followed by a drop-down list. And using a function to deal with that.
But then again you’ll want to sanitize that name before you use it for much. You sure don’t want to set a cookie and start calling someone something derogatory after them flippantly answering ‘off the cuff’.
Of course, you’ll have GDPR and privacy concerns to deal with on that, too.
You also have the seeds of a great, fun AI plugin there if you wish to pursue that further.
And you might quote a price back to your client for creating the other ‘pages’ then hire a kid, neighbor, or friend to create the discrete pages where you might make a small profit and share the joy ($$$) with someone else.
Joy
(@joyously)
This is what WordPress does with everything, since there are no actual pages in the files. It’s call rewrite rules, and the first thing checked is Page names. Did you have a plan for when two people have the same name, or is it only a message and does not matter after that? You would still need one Page for the destination, and show the name in the URL on it.
https://codex.wordpress.org/Rewrite_API
I would think you should look for a plugin. If the only thing different about each page is the greetings. I’m sure there probably a plugin that would handle customizing the greeting. All the information about users are stored in the users,usermeta, and options database tables. I think you just need to find the right filter and create a plugin to replace the current greeting with the one you need. I would bet there probably already a number of them made.