Template Redirect

Use this to process anything before all the other filters and fuctions get their grubby little paws on it

This can be used to call a custom template when some condition is met. This can be used to catch $_POST data and do something with it. It can be used to redirect people if some condition is right.

function process_something() {
    if ( is_single() && in_category(69)) {
    include(TEMPLATEPATH . '/something.php');
    exit();
    }
}
add_action( 'template_redirect', 'process_something' );
Comments