Target a certain page within wordpress backend (admin) i.e. Pages > About

How can i progammatically see if the page that is currently open in the wordpress admin is ‘About-Me’;

I wish to run specific functions depending on the page the user is editing in the wordpress-admin.

Related posts

Leave a Reply

1 comment

  1. You can use the $post global.

    Somewhere inside of a function, hooked in appropriately to the post-edit screen:

    // Globalize the $post variable
    global $post;
    // check to see that we are on a page, with a title "About Me"
    if ( 'page' == $post->post_type && 'About Me' == $post->post_title ) {
        // This is the "About Me" page;
        // do something
    }