I assume you mean to use this on a single product’s page, right? If so, try this:
add_action('admin_head', 'wwc_my_custom_css');
function wwc_my_custom_css() {
if (!current_user_can('edit_pages'){
global $post;
$isProduct = $post->post_type == 'product'; // use the actual name for product
if ($isProduct ) {
echo '<style>
#mceu_27-body, #wp-content-editor-tools{
display:none !important;
}
</style>';
}
}
}
Related Posts:
- Woocommerce – custom post type of checkout page
- How to get only post=’product’
- How do I create a link that will always show the latest post?
- What is the difference between “post” and “page” in WordPress?
- Create custom page in WooCommerce
- WooCommerce – Create Products Programatically [closed]
- How to Use PHP Code In-Page?
- Understand post type
- View the number of entries recorded per day
- Display featured products by category
- Insert woocommerce products programmatically with featured image and gallery
- Problem with adding programmatically woocommerce product post into category
- Skip in WordPress Post ID’s, can this cause issues?
- How do I change the core post search algorithm? Where is it found/constructed?
- how to get random post id by using post type
- Show posts count for Categories and Tags in wp_nav_menu
- why there are so many posts whoes post_type is revision? will these records waste too much database space?
- Post type no single page
- Is it possible to automatically publish a post once a woo-commerce product is published?
- Restore woocommerce orders
- Get category slug of the Parent category of a Product
- How to fetch courses in all languages in WordPress?
- How to distinguish pages created by woocommerce?
- Disaply products from category
- Show code only on WooCommerce Pages
- Taxonomy Category category.php not working
- How can I get the first post THIS SAME CATEGORY?
- Wp_query WooCommerce products
- How do i retrive a post from a custom post type
- simply loop through posts
- Difference between an archive and a page listing posts
- WordPress Queue like Tumblr?
- Moving WordPress to new server: no posts found
- the_post_navigation seems to ignore same category filter
- How to avoid duplicate posts on front page?
- Get current users post URL?
- Remove some articles from the list in WPAdmin for a user
- Pagination – Posting First Page Content
- How to Add ‘Post Categories’ to the Dashboard Sidebar
- How to show featured image in custom post type dashboard post page
- Notification to Admin or Author upon new post [duplicate]
- Displaying a widget only on long posts (over X characters)
- How to create a load more post entries like Twitter?
- Show total author’s post views by posts post_meta
- Is there a way to apply WordPress categories at the block level?
- Why is my Blog Page ID == First Post ID?
- Featured Image uploaded, attached and set but only appearing in the media library
- Custom loop pagination links not working
- CF7 upload file failing [closed]
- Hightlight unread posts or new posts since last login
- Editing 375 posts simultaneously? Maybe from the database?
- Why does WP_Post not contain its permalink?
- How Do I Get My Post Tags to Alphabetize?
- Remove Featured Image & All Media Uploaded to the Post
- How to add a class to edit_post_link?
- Transition from Draft to Scheduled Post with wp_update_post
- Display related post by tag name of current post
- Posts showing […] in it
- Custom Permalink Structure for Pages & Posts
- Getting a “404 Not Found” error when “Preview Changes” is clicked
- Display a list of users who have viewed the post you are viewing
- How to give classname to post if post has no content?
- wp_update_post creating revisions instead of updating the post
- Display selected categories onto post page
- Audio post format with Advanced Custom Fields
- Post/page title to permalink transformation – what is behind the scenes?
- Would a “hub” page work better as a page or a post?
- Same post appears in related Posts?
- How can I create an RSS feed that includes “Private” posts?
- Change post date in menu to post title
- How to show full post on home page
- Trying to exclude custom posts based on date, while sorting by custom field
- Show Last Revision Of Post That Has A Published Status On Single Page
- DEL media from the post but keep my featured image or post
- Set post title font size automatically according to number of words in post title
- wp_trash_post() duplicates post to trash
- How to backup WP blog posts to computer, not new site
- Add view to admin menu to filter for specific criteria ( If post is child of specific Parent )
- Create Posts from API response without duplicates
- I want to change the WordPress comments file
- How to make an image appear as a thumbnail in the blog post?
- How can i take all ids from untrash_post action?
- Can I Paginate Post after every 25 tag?
- How to show posts ordered by random [duplicate]
- Not display post meta if empty
- Query posts from newest category
- Trim excerpt to first paragraph
- Adding div to WordPress page content
- WordPress loop uses unmodified posts array, why?
- Create new post on user registration
- Ajax – Post Categories and Load More
- Skip posts, but keep posts per page
- How to display custom content in post with category XXX
- how to add a facebook page latest posts into my wordpress site
- Display only posts with comments
- Display ONLY Latest Post From Several Categories
- how to show all type of author posts in author page (SOLVED)
- WordPress Page Column Problem [closed]
- If meta_key exists then don’t select this post?
- Image inside the content is replaced with featured image from my older post