Why is $wp->request empty in WordPress 6.0?
What is the correct way in WordPress to obtain the current page url? You don’t, WP has never provided a way to do this, the closest is get_permalink which provides the canonical URL of the current post. What you’ve been using is unofficial, and never gave you the actual URL as it only appended the … Read more