How to detect current page
-
Hello,
I am a wordpress developer. I need to detect if the current page is “Activate”. I am trying following code but its not working when any user click on their activation link from their email address:
function my_redirect() {
if ( is_page( array( 38, ‘activate’, ‘Activate’ ) ) ) {
//Do stuff here..
}}
add_action( ‘template_redirect’, ‘my_redirect’ );Is there any other way so that I can detect if the current page is Activate or not?
Thanks in advance.
Sam
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘How to detect current page’ is closed to new replies.