The link above describes Konstantin Kovshenin’s method in getting current URL in WordPress. However, the given method appending both request path and actual query string when accessing a page. What I want was getting the request URL and forget about the query string since I want to match it with the URL generated by get_archives_link. Hence, this is what I ended up using:

Share Your Thought