To insert links at that position, you need the filter views_edit-POST_TYPE
, replacing POST_TYPE by the slug of your CPT.
Example:
add_filter( 'views_edit-portfolio', 'custom_list_link_wpse_79975' );
function custom_list_link_wpse_79975( $views )
{
$views['dashboard'] = '<a href="' . admin_url('index.php') . '">Dashboard</a>';
// $views['another-view'] = '<a href="#">Contact</a>';
return $views;
}
Results in:
The second question should have been a separate Q, but while we at it…
You could create your own meta box, but there’s a couple of useful hooks:
// Another possible action hook is: post_submitbox_start
add_action( 'post_submitbox_misc_actions', 'custom_publish_link_wpse_79975' );
function custom_publish_link_wpse_79975()
{
// check for post type
global $current_screen;
if( 'portfolio' != $current_screen->post_type )
return;
echo '<div class="misc-pub-section my-link">
<a href="' . admin_url('edit.php?post_type=portfolio') . '">Cancel</a>
</div>';
}
Which results in: