Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to detect current page


  • Sam
    Participant

    @sam_the_rider

    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 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.
Skip to toolbar