WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What I need to do is inspect the content of the post and title and based on the inspection, redirect to a different page. To do this, I need to know if a "POST" action is for saving a post. How to detect this?

share|improve this question

Take a look at the Plugin API/Action Reference: Actions Run During an Admin Page Request..

Then add something simple to the appropriate hook:

function wpse19260_inspect_post()
    echo '<pre>';
        // print_r( $_POST );
        echo $_POST->ID;
        echo $_POST->post_content;
        echo $_POST->post_title
    echo '<pre>';
add_action( 'publish_post', 'wpse19260_inspect_post' );
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.