Skip to content

Instantly share code, notes, and snippets.

View yawalkar's full-sized avatar
🏠
Working from home

Nitin Yawalkar yawalkar

🏠
Working from home
View GitHub Profile
@yawalkar
yawalkar / gist:d63020d428c1eec3bdae5d7fb9a2e1f1
Created January 25, 2017 13:12 — forked from pdewouters/gist:4526457
Remove the 'View' link from the admin bar for a custom post type
/**
* removes the 'view' link for CPT in the admin bar
*/
function pdw_admin_bar_render() {
global $wp_admin_bar;
if('client' == get_post_type()){
$wp_admin_bar->remove_menu('view');
}