You could do something like (in your functions.php file);
if(current_user_can('member')){
add_filter('get_sample_permalink_html', 'perm', '',4);
function perm($return, $id, $new_title, $new_slug){
$post = get_post( $id );
if( ! $post || ( $post->post_type !== 'testimonials' ) )
{
return $return;
}
return preg_replace(
'/<span id="edit-slug-buttons">.*<\/span>|<span id=\'view-post-btn\'>.*<\/span>/i',
'',
$return
);
}
To give credit where credit is due, everything between
if( $_GET['role'] == "member" ) {
and
}
…is directly taken from this Question & Answer HERE courtesy of Jonathan Wold
UPDATE
The conditional if statement of;
if( $_GET['role'] == "member" ) {//code here }
was replaced with,
if(current_user_can('member')){ //code here}
…in this instance.
Related Posts:
- Allow role to delete posts but block him the wp-admin
- Only an admin can add new tags
- How to remove a column from the Posts page
- Where is the old post permalink slug stored?
- Update post counts (published, draft, unattached) in admin interface
- How to display by default only published posts/pages in the admin area?
- Set Default Listing “View” in Admin
- display all posts in wordpress admin
- How to Check if a Page Exists by URL?
- Use category base slug in posts’ permalink
- Allow user to “edit_others_posts” to save only, not publish
- Sends out email to admin
- Can I force a metabox to be in one column?
- How to automatically generate a unique random slug
- Custom permalink structure only for default posts
- Post slugs and images cannot have same name?
- Change permalinks for post type ‘post’ only
- Add a new post status in the post progression
- Help! Turn php link data into url OR hide edit link in post admin OR hide drafts for all users except admin?
- Modifying admin sidebar contents to show pending posts indicator
- Change the Slug of Post Type post to baseurl/post/%postname%
- Different permalink for posts and authors
- Pretty URL with add_query_var
- How to limit user to publish post per day and per role?
- Any way to create a revision of a post ONLY with a new button in the Meta Box?
- using slug instead of ID in admin edit post url
- get_permalink returns default link
- Add role that restricts user to post in specific category
- Group Posts by First Letter of Title
- Keep getting same permalink with WP_Query?
- How to control which category will be picked for the slug of a post?
- How to Load Scripts and CSS for Admins Only When Editing or Adding Posts
- how to get permalink using sql
- Change slug with custom field
- Add “Post Options” for new wordpress post
- Post Admin – Filter by posts without tags
- Add javascript when post is published
- Why can posts never have a number as the link?
- Why does the_date work in the first custom column, but not in the second, in a series of customized Posts columns?
- Add link on the top menu of the post table?
- Add a special filter link to All Posts in admin
- Must permalinks always point to single post pages?
- which action to hook to in order to perform post-publish action
- Remove Posts Quick Edit link for specific user role? WP 3.3
- How to allow slashes in single posts when i click in the edit permalink button
- Make “Post published. View post” Open in a New Tab
- Overview with latest edited posts and pages
- Hiding by default specific post status on backend list?
- Post custom permalink results in 404 for archive page
- Some posts returning 404 instead of displaying post
- Custom colors for post rows based on post meta value
- How to add an admin function only to posts, not pages?
- prevent showing posts of an specific category in admin posts section
- Custom post type single (permalink) throws a 404 error
- Link for the page archive for posts, like using custom post types with get_post_type_archive_link
- Post in Multiple Categories to stay in current category (permalink, next previous post link)
- Remove whitespace at the end of posts?
- Is there a way to change the color of a row in Post Administration based on the type of post?
- Add filter-by-tag in the all posts admin console page
- Random post permalink
- What Defines What Category A Post Picks (if in multiple)
- get_permalink executes link without https
- Multiple authors for single post without plugin
- Permalink Settings: optional settings doesn’t apply to editor
- How to get a nofication when post submitted
- Custom post type permalinks breaking due to 3.1 bug fix
- If specific user role then sticky post
- How can a guest view the “Pending Review” Post?
- Create pretty permalink for a post knowing the permalink structure
- Changing my permalink structure – will new layout conflict with existing page?
- How to change the page break URL from ../post/2 to …/post/page2/
- Link post permalinks to subdirectory /post
- change default post archive page link
- How do I add a custom body class to the admin area of a page?
- Adding a text link under the post title in the lists of posts
- Remove permalink from images when inserting into post
- Is it possible to change the admin posts per page view?
- Downgrade user from role that allows post creation
- Change default Posts page
- Dynamically generate child-URLs for posts or custom posts
- Bulk update post slugs through database
- Show info to author only
- Adding parent pages to posts
- Plain permalinks not working!
- Posts with multiple authors with different roles
- Removing rel=”nofollow” from links posted in Post Content
- How to change permalink on post click on post listing page
- Disable inline_edit() on edit.php
- Changing Permalinks for Default Post type to reflect navigation
- How should I add links to other pages/posts from my post?
- WordPress not opening posts with only numbers if permalink is post_name
- Update a users role based on number of posts published
- Using permalinks, category slugs, and tag slugs
- Change user role when post approve
- Problem with permalink routing?
- Move first half of posts to one parent page, second half to the other page
- Stop users posting into category while still seeing contents of the category
- How to check a post exist when the permalink has post id in it?
- How to allow an editor to edit all WordPress blog posts but have the last say as administrator?
- After database migration, posts not showing up in dashboard