Wordpress - how detect if current page is the login page

后端 未结 4 1524
生来不讨喜
生来不讨喜 2021-02-05 06:39

There is a better way than using global variable $pagenow to detect current page if is login page, like a is_admin() ?

if ($pagenow !=          


        
4条回答
  •  迷失自我
    2021-02-05 07:00

    Can't you explain what are you going to do with it? So I can tell if you should code using wordpress hooks.

    or you can use the absolute uri, just match it with wp-login.php

    ?>

提交回复
热议问题