How can I check if the current page is
Are there more elegant solutions than using
Use the global
and if your wordpress is not installed in the web root folder, you should use some params like
I am only interested in register page, not in login page. So this might not be wanted by everybody.
$GLOBALS['pagenow'] returns index.php for me. Maybe because of buddypress or my theme.
So I used
If you inspect the body of the registration page, it also has the ID as well, so if it says page-id-4906, you can use it this way if it works better: