Answer the question
In order to leave comments, you need to log in
Wordpress redirects to the profile page do not work if the nickname does not consist of numbers, how to solve?
Hello, problem with wordpress redirects
Made a profile page with my own template.
It is necessary that when you go to the site / profile / "whatever", the created page with the profile template opens.
It works for me only if you enter numbers, with ordinary nicknames it works only through a dynamic parameter
How to solve this problem?
Tried to add different rules to .htaccess via template function
for example:
function do_rewrite(){
add_rewrite_rule( '^(profile)/([^/]*)/?', '?nick=$matches[1]', 'top' );
}
Answer the question
In order to leave comments, you need to log in
function do_rewrite(){
add_rewrite_rule( '^profile/([^/]+)/?', '?nick=$matches[1]', 'top' );
}
Select Settings -> Permalinks and just click Save Changes without any changes
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question