-
-
Save KnowTheCodePro/7136c7b4c1611a3cd598ada1510a5887 to your computer and use it in GitHub Desktop.
is_front_page() vs. is_home()
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace KnowTheCode; | |
add_action( 'wp_head', __NAMESPACE__ . '\check_whether_front_page_or_home' ); | |
function check_whether_front_page_or_home() { | |
d( is_front_page() ); | |
d( is_home() ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment