Your screenshot seems to indicate that you’re interested in the status message for your custom post type saying 'Page updated. View page'
. If that’s true, the reason that you’re getting 'Post updated. View post'
is that you haven’t provided status messages for your custom post type.
Here’s the code for the admin edit page (edit-form-advanced.php
):
if ( isset($_GET['message']) ) {
$_GET['message'] = absint( $_GET['message'] );
if ( isset($messages[$post_type][$_GET['message']]) )
$message = $messages[$post_type][$_GET['message']];
elseif ( !isset($messages[$post_type]) && isset($messages['post'][$_GET['message']]) )
$message = $messages['post'][$_GET['message']];
}
So the edit screen is trying to retrieve messages for your $post_type
(agenda), not finding them, and displaying the post messages.
You can fix this by creating $messages['agenda']
with something like the approach described on the Register Post Type function reference:
function agenda_update_messages( $messages ) {
global $post, $post_ID;
$messages['agenda'] = array(
// ...
1 => sprintf( __('Page updated. <a href="https://wordpress.stackexchange.com/questions/94958/%s">View page</a>', 'your_text_domain'),
esc_url( get_permalink($post_ID) ) ),
// ...
);
return $messages;
}
add_filter( 'post_updated_messages', 'agenda_update_messages' );