Quantcast
Viewing latest article 2
Browse Latest Browse All 5

Answer by Dylan Pierce for When to use is_home() vs is_front_page()?

I've discovered that is_home() and is_front_page() don't deliver what's expected for multisites. My workaround using built in PHP goodies:

if($_SERVER['REQUEST_URI'] == '/') {    // you must be on the home page}

As mentioned in the comments, this approach will not work for WP instances installed in subdirectories of the web root. Use at your discretion.


Viewing latest article 2
Browse Latest Browse All 5

Trending Articles