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
- Order posts alphabetically: how to set order=asc in mysql query?
- How to order posts in an arbitrary order?
- Trying to alter the post_content through the_post
- Automatically create a new page daily with last three posts
- How to get ID of the page included with get_page()?
- Add filter to the end of the post
- save_post hook is not called when post is saved
- Howto show comment count by post in post?
- How to add a class to each individual post?
- Indirect modification of overloaded property WP_Post::$ancestors has no effect
- How do I change the location of post-specific information?
- Summary of Posts by an User
- ACF to select posts not displaying on blog page
- Benefits to using semantic HTML in post content? [closed]
- Check if current user has a post and that post has any term/s from a specific custom taxonomy outside the loop
- How can I insert a new markup element after 4 posts automatically? [closed]
- the_excerpt is displaying excerpts of every post
- How to remove “» (title of post or page)”?
- Extract wordpress posts content and category content
- Post: how to set created date after post has been published [closed]
- WordPress loop not working on static front page
- Sidebar on single.php not showing up
- remove all custom post created
- Multiple Blog Pages
- Hide content from Post Preview
- How to get the next and previous image title from attachment or gallery?
- Closest post to a date
- Adding if statement into the_content()
- Pagination for posts inside a specific category
- Change modified date to current date when title updated automatically
- Creating a redirect option for current page url
- how to find the posts page
- How to edit a custom theme?
- WordPress posts have a different URL to the index
- Why sorting posts doesn’t work properly?
- How can I create a shortcode to show the number of posts of actual day?
- Post title links appear to be broken
- the wp_post_update isn’t working all the time
- I want to add the 10 most recent posts under a parent category on the main menu
- Auto inserted strange characters in wp post
- WordPress rest API get Posts parent by post ID
- Set featured image as hero image on each page
- How to increase the number posts that displays by a hierarchical taxonomy? (HTTP ERROR 500)
- Get origin or context of a how a post got created and/or updated
- WordPress weird behaviour on comments
- WordPress the_category(); only works with message-posts not with project posts, how do I specify project categories?
- The letter “i” appears capitalised even when I don’t mean to capitalise them
- post is not showing more than 3949 words
- I really need help… I am looking for a solution about 28hours
- Custom Post Type Rewrite URL
- Word /blog/ in slug post, problems in CPT. Solutions?
- How to add post under particular pages? Like website.com/page1/post1
- Posts content is display added with title, instead of content, using the_excerpt()
- WP_Query sort by meta_value_num or date
- Category and Posts in front page
- How do I get a certain set of posts from the database?
- Stop images from being displayed on the front-end of the site
- Posts tagged with a-new-tag does not appear
- Posts Not Paginating
- How to show different categories in different pages?
- Set the limit to allow author when make post!
- Assign certain editors to certain posts
- hypher.js doesn’t work to IE and Chrome
- Custom Post Title as search term
- $attachment->post_title not displaying title
- What does WordPress mean by they have full rights to content [closed]
- Adding a post to a page
- Password protection doesn’t prompt for password on pages
- Site ‘Categories’: save an admin global setting with post metadata [closed]
- I cannot see the pagination in /wp-admin posts page
- Insert Tag in WordPress Post