New answers tagged

3

You need to check if the siteurl differs from the home URL: if ( get_option( 'siteurl' ) !== get_option( 'home' ) ) { // whatever This also works if home is a subdirectory of the root, with WordPress installed in yet another subdirectory. For example: domain.com/blog (URL) and domain.com/blog/wordpress (siteurl).



Top 50 recent answers are included