There is a filter get_sample_permalink_html that returns this area as a string. Here’s how you can use it:
<?php
add_filter('get_sample_permalink_html', 'perm', '',4);
function perm($return, $id, $new_title, $new_slug){
global $post;
if($post->post_type == 'testimonials')
{
$ret2 = preg_replace('/<span id="edit-slug-buttons">.*<\/span>|<span id=\'view-post-btn\'>.*<\/span>/i', '', $return);
}
return $ret2;
}
?>
Updated the code. Please check this.
Updated Changed the double quotes to single quote on view-post-btn. Tested up till 3.2
Related Posts:
- Multiple Custom Metabox Help
- wp_dropdown_categories in custom post type with custom taxonomy
- How can I add a column/s to wp_posts table?
- Remove tabs from media uploader for a CPT
- Find callback function for custom taxonomy metabox
- Remove custom metaboxes from custom post type
- Add special meta box to custom post type
- Custom field values get deleted
- WordPress metabox file upload in custom post [duplicate]
- Display metabox conditionally
- Adding Custom Metaboxes to Custom Pages
- Save or update data when custom post published
- Custom metabox translation
- How to add multiple featured image in meta box in post editor?
- Timepicker-addon doesn’t show – Datepicker works fine?
- Adding Meta Boxes while Registering a Post Type in a Class
- Metabox Populated with a Custom Post Type – How to Output CPT based on Select?
- Is it possible to create a post using a metabox?
- Custom Post Type Metabox – Not Saving
- WordPress custom meta field for custom post not storing data
- How to Duplicate (multiple meta box)?
- List of Posts in a Custom Field
- Add Standard Page Attributes Metabox for Page Parent
- dynamically add a custom field or metabox to custom post type [duplicate]
- Custom date changer post_date => future – missed schedule error
- How to Upload CSV Data into Custom Post Type Data with Metabox programmatically
- Display correctly using metabox.io
- Translating custom post type metaboxes [closed]
- Adding a metabox on a CPT’s submenu page
- How to Add multiple instance of meta box to custom post type
- Checking if $_FILE isset for an array of file upload metaboxes
- Ordering values entered in Custom Taxonomies
- Permalinks: custom structure for taxonomy – tags?
- Custom Post Type & Meta Box – Displaying meta box information on front end?
- Sizing textarea field in custom metabox
- Meta Data for Custom Post Type not saving
- Remove “show sharing buttons” metabox Jetpack from custom post type
- Custom Post Meta from custom metaboxes is randomly being deleted
- Custom post-type metabox position
- How to add editable/dynamic values to dropdown of a Custom Post Type Meta Box
- Custom Meta Box Causing Error: “Are you sure you want to do this? Please try again.”
- What do the numbers mean at the end of add_action(‘save_post’)…?
- wysiwyg editor don´t export paragraph
- How can I set a meta value that will then affect other post meta values?
- Inefficient Query Confusion
- Custom Meta Box returns no HTML
- How to Use Custom Meta Field Instead of CPT Title in Post URL
- link featured image to external link
- Removing numerous Meta boxes from numerous CPTs
- Get custom term meta problem on single post type
- Is it possible to sort metabox teaxtarea values?
- wp_editor for custom post type doesn’t save value
- Showing a meta box in a custom post type on a page
- Having Issue on Getting Metabox Checkbox Value
- Save Metabox Custom Field Value
- Multiple wp_editor instances in custom post type using Ajax
- CMB select with data from CPT
- Updating post content and custom fields in edit post screen
- Add a class to post_class if more than one post shares same meta_value_num
- Function to return values from metabox
- Add a meta field to the list of results for a custom post type
- List of all posts in one custom post type in the edit screen of another
- Select Venue from dropdown list and reuse stored address information in meta_box
- Custom Meta Box with variable number of fields
- Create a custom post type based on ‘Post’
- How do you make relational post types in WordPress? [duplicate]
- Placing Admin Post Metaboxes in Tabs
- Wp Meta Query does not work while simple Query Works
- Save Custom Post Value
- How to Grab Anime info using Jikan API and fill the value in Metabox
- create a “add icon” field in taxonomies page
- Problem with multi checkboxes value in metabox?
- Getting data from dynamically allocated metaboxes within a custom post
- $_POST from a Meta Box
- Get meta values from parent post and save in child post
- Using meta boxes as the title of a custom post type
- check_admin_referer not working in custom meta box for custom post type
- Populate metabox dropdown with post title from another Custom Post Type (issues with wp_reset / global $post)
- Custom meta box in editor of custom post type not working
- Avoid another meta box in my custom post type
- Meta box not saving
- CPT and metabox: create multi checkbox by using array?
- How to make post page unique and show it on home page?
- How can i embbed two different galleries in custom post type
- Default taxonomy ‘post_tag’ added to CPT managing by custom role : nothing in the metabox
- Add different meta box based on taxonomy
- Custom sortable pages on custom post type
- Toggle a metabox based on a selection
- Add multiple custom meta boxes to different custom post types
- Custom post type Featured Image popup not working
- Need to build custom metabox select prev posts by category
- How to bring custom meta boxes to custom post types?
- Custom post type in submenu with custom meta box as a title with custom html
- Problems with a custom meta_box
- Customized featured image doesn’t refresh in post admin metabox after upload/insert
- Saving custom metabox data with a twist
- Canot save post if any meta box was empty
- Cannot change meta box position
- My custom meta box with textarea field not saved
- Can’t retrieve custom post type taxonomy term to custom post type editor