Title: Retrieving Current URL
Last modified: August 19, 2016

---

# Retrieving Current URL

 *  [l2lulu](https://wordpress.org/support/users/l2lulu/)
 * (@l2lulu)
 * [18 years, 2 months ago](https://wordpress.org/support/topic/retrieving-current-url/)
 * Any idea how to retrieve the URL of the current page, regardless of whether it’s
   a category or a page or a single post or the home page? I need to compare this
   value with bloginfo(‘url’) because the is_home() function is not working for 
   me.
 * I want to make the comparison in either my sidebar.php or my footer.php to determine
   which sidebar to display.
 * Thanks.

Viewing 1 replies (of 1 total)

 *  [mat_](https://wordpress.org/support/users/mat_/)
 * (@mat_)
 * [18 years, 2 months ago](https://wordpress.org/support/topic/retrieving-current-url/#post-702163)
 * maybe $_SERVER[‘REQUEST_URI’] ?

Viewing 1 replies (of 1 total)

The topic ‘Retrieving Current URL’ is closed to new replies.

## Tags

 * [is_home](https://wordpress.org/support/topic-tag/is_home/)
 * [url](https://wordpress.org/support/topic-tag/url/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [mat_](https://wordpress.org/support/users/mat_/)
 * Last activity: [18 years, 2 months ago](https://wordpress.org/support/topic/retrieving-current-url/#post-702163)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
