• Resolved Abdessamad Idrissi

    (@numediaweb)


    I want to “hijack” the wp-login.php page to make a custom login page, yes I know there’s plugins that allow you to do so, but I need a more customized/independent solution; .

    so far I use if ($pagenow == 'wp-login.php') but I have read that it is not recommended to use core variables inside themes/templates.

    so the question is how to detect that we are in the wp-login.php page since this is a special page not just an ordinary post or page?

    thanx

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Abdessamad Idrissi

    (@numediaweb)

    I created a feature request ticket:
    #15686

    Thread Starter Abdessamad Idrissi

    (@numediaweb)

    after posting on trac, nacin posted the answer:
    It’s fine to reference globals. Using pagenow is quite common in fact.

    That said, there’s the $current_screen object, which if you prefer, has its own getter, get_current_screen(). This was introduced in 3.0 and includes much more information and context than pagenow.

    thanx nacin.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘any substitute for $pagenow global var?’ is closed to new replies.