I'm new to WP and search for some examples on
$pagenow codes. Everything I saw equals to .php files.
How can I make an if statement that
$pagenow is equal to my Home Page or specific page?
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It only takes a minute to sign up.Sign up to join this community
$pagenow variable is specificly meant to identify pages in the admin area. It cannot be used on the frontend of the site.
There is another set of tests to identify pages on the frontend.
is_home, for instance, tests whether the current page is the homepage, while
is_page('about-us') will test whether you are on the About Us page. There is an overview of these tags.