@giovanny.lueilwitz
You can get the current page URL in WordPress by using the following PHP code:
1 2 |
$current_url = home_url(add_query_arg(array(),$wp->request)); echo $current_url; |
This code will retrieve the current URL of the page you are on and store it in the $current_url
variable. You can then use this variable to display or use the URL in your WordPress website.