Answer the question
In order to leave comments, you need to log in
How to get current page url in wordpress?
Hello. There is a multisite on WP with identical structure in different languages. How to dynamically get the url of the current page (maybe there is some function for the template), so that when redirecting it does not redirect to the root of the site, but redirects to the same page, but on a new domain. For example, from example.com/page1 to subdomain.example.com/page1
Answer the question
In order to leave comments, you need to log in
Either through get_permalink( $post->ID );
or by standard means
$Path=$_SERVER['REQUEST_URI'];
$URI='http://site.ru'.$Path;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question