Post type is reflected in body
as class. It is .post-type-post
for posts, .post-type-product
for WooCommerce products and must be .post-type-food
in your case. So, you can use css rule like that to detect certain post type:
body.post-type-food #titlediv input {
background: yellow !important;
}
Post status is reflected only in TinyMCE editor classes, as .post-status-draft
. You can use it as follows:
body#tinymce.post-status-draft {
background: red;
}
Related Posts:
- wp_list_tables bulk actions
- Restrict access to admin but allow admin_post hook
- Looking for a hook to add attachment information to the media library tab
- Add “Page Revised” column to Admin
- Stop loading “collaborators” users on add new post or page?
- Stopping user deletion from running on error
- Enque script based on url paramater
- ‘wp’ hook supposed to trigger when editing a post?
- Trying to get custom js files in my admin header
- Add and Remove Row Actions in an Existing WP_List_Table
- How can I prevent a function from loading in the admin screens?
- How do I add something to the “Edit Tag” page in wp-admin?
- Remove menu item dashboard for a unique user
- Custom comment action
- Action for opening edit page in admin?
- How to restrict dashboard access to Admins only?
- How to disable the “Post Lock/Edit Lock”?
- How can I control the position in the admin menu of items added by plugins?
- Check if user is admin by user ID
- Unable to login to my wordpress site. reauth=1 redirection loop
- Highlight custom widgets in the admin area?
- Can I add custom attributes while adding inline scripts?
- create users to site with specific language
- Hide a page in the admin end without a plugin?
- Prevent from deleting any user role but subscriber
- Disable sticky posts feature
- Hide username from users list
- Remove HTTP: from the site URL and just keep // in it
- Prevent Admin gui output from page added using add_submenu_page
- Activating Child Theme Breaks Website, Blank Page, Error 500
- wp-admin blank in a clean install of WordPress on PHP 5.4 [closed]
- How to use Yoast SEO backend in english even if WPLANG variable is not english?
- Admin first hook that outputs HTML?
- Remove “Get Shortlink” button in admin of custom post type
- WP Database Error (Windows Server 2008 & SQL Server)
- Cloned a site but can’t log in – redirecting to old site
- Can I edit the wp_post > post_content right before its inserted/updated?
- Should I add the IP of the server that hosts my sites to the list of authorized IPs in the wp-admin/.htaccess?
- wp-admin edit user url wont show up correct url [closed]
- Which HTTP headers to use for subdomain embedding?
- To remove default dashboard items and add quick draft widget for custom post type
- FORCE_SSL_ADMIN not working
- I get “The PHP Date/Time library is not supported by your web host.” on my CentOS host, what library to I need to install to add support?
- wp_before_admin_bar_render action not working in back office
- Can enter wp-admin when logged in with custom ajax
- Locked Out Of WordPress Admin Dashboard After Server Move
- lock meta box position on post edit screen for contributors
- map_meta_cap was called incorrectly error?
- How do I host WordPress on a hidden domain through a reverse proxy?
- Clicking On View Post In Draft Opens New Tab
- How to set admin login page as home page
- Users disappeared from wp-admin
- WordPress (behind HAProxy and Jetty), not multisite, in sub folder – and /en/wp-admin/ keeps redirecting to /wp-admin/
- Created a new subdomain with same content. Should I add a redirect in my old subdomain?
- Placing a custom Control element in an existing block InspectorControls panel
- What are the requirements to make the admin toolbar show up on the front end
- Sorry, you are not allowed to access this page
- wp-admin folder removed by hacker [closed]
- Hide username discovery
- Cookie Domain is preventing Admin login
- How to use the built in tooltip for form validation error messages in WP admin plugin?
- _wpnonce blank screen
- Custom Admin Pagination links
- Have different site location for wp-admin in IIS
- Lost administrator privileges and can’t find a fix
- How to set where user is redirected to after logging in at wp-login?
- How to display site title with post title?
- Cant login to wp-admin
- Cannot redeclare wp_update_core()
- Remove WP Admin Menu Items by User Role
- Adding a button to send email to a user in WordPress Admin Users table
- Our Team not showing on website [closed]
- Creating custom admin panel pages without making a plugin?
- jQuery UI Datepicker error
- Can’t connect to WP-Admin, blank error message
- Can’t access wp-admin after http to https change
- Programtically selecting image URL in Media Library modal
- wp-admin: “Sorry, you are not allowed to access this page.”
- How to access wordpress from domainB which is installed at domainA
- How to optimize the opening speed of admin panel?
- WordPress /wp-admin redirect to wrong port in docker
- How to change the URL of sub menu page?
- Change wordpress admin home page
- Cannot access wp-admin after migration to another place
- How do I fix the 403 error for wp-admin/admin-ajax.php?
- Strange Popup Ad on my WordPress Admin Dashboard
- Trying to list user and post information from (wp_includes/post.php ) causes Fatal error
- Unable to Add User after Site Migration
- Get Post ID in Admin Edit screen otherwise generate it?
- Cannot login in WordPress even after changing hash password in phpmyadmin
- WordPress User profile page fields missing
- Is it possible to outsource wp-admin to another server?
- Disable default posts (Posts,Pages,Comments and Media) in wp-admin
- Trying to use and understand JSON API and get_posts
- Search box for hierarchical taxonomies in admin interface
- Customize a WP_Posts_List_Table class
- I want to know if it’s good for SEO [closed]
- Help please i cant login to wordpress panel [closed]
- My website does not load since two days!
- After Upgrade: $user becomes unknown (id: 0) after successful login?