T
T
thehighhomie2016-01-29 09:16:49
WordPress
thehighhomie, 2016-01-29 09:16:49

Wordpress creating request via $_SERVER['REQUEST_URI']?

Hello! I'm writing a personal account plugin, not a standard one, plus this is my first WP plugin, so I still don't know much.
The point is as follows: When registering in the database, together with the received data (login, password, etc.) I generate a link for this user - home_url( '/' ) . $login and put it in the database. It turns out something like mysite.ru/user777.
So, in the handler function, hung on the init hook, I set the condition:
if ( $_SERVER['REQUEST_URI'] === $user_profile_link ) include $profile_template;
During the transition, everything connects, but with a 404 error. Unless, of course, because the page does not find it. As I understand it, this is not good, I looked in the documentation and in general in the search for some kind of functions, but did not find anything. How can this be done correctly?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
WP Panda, 2016-01-29
@thehighhomie

Do you generate your account page for each user?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question