я бы сделал че т типо того
add_action( 'wp', 'generic_content' );
function generic_content() {
global $wp_query;
if ( $wp_query->is_404 ) {
status_header( 200 );
$post_title = 'change me';
$post_content = 'change me';
$post = new stdClass();
$post->ID = - 1;
$post->post_content = $post_content;
$post->post_status = 'publish';
$post->post_title = $post_title;
$post->post_type = 'generic';
$post->post_name = $post_title;
$post->comment_status = 'closed';
$post->ping_status = 'closed';
$post->post_password = '';
$wp_query->found_posts = 1;
$wp_query->is_404 = false;
$wp_query->is_posts_page = 1;
$wp_query->is_single = 1;
$wp_query->is_singular = true;
$wp_query->max_num_pages = 1;
$wp_query->page = false;
$wp_query->post = $post;
$wp_query->post_count = 1;
$wp_query->posts = array( $post );
$wp_query->queried_object = $post;
}
}