If I understand you correctly, you want a custom editor style when editing the homepage? You can check if you’re currently editing the homepage by comparing the post ID to the ID in the page_on_front
option, like this:
function homepage_editor_styles() {
global $post_ID, $post_type;
if ( empty ( $post_ID ) || 'page' !== $post_type )
return;
if ( $post_ID === (int) get_option( 'page_on_front' ) ) {
add_editor_style( 'css/editor-style-homepage.css' );
}
}
add_action('admin_head', 'homepage_editor_styles');
Related Posts:
- How set defaults on wpLink()
- Remove ‘Custom..’ option in tinyMCE colour swatch
- Make fonts.com font work in TinyMCE (iframe referrer issue)
- Add button in TinyMCE editor to insert text
- TinyMCE Autoresize
- WordPress Admin Not Loading All Core Scripts
- TinyMCE strips breaks inside editor
- How to add ‘Insert HTML Table’ button to TinyMCE in admin?
- Strange wp-admin problem for all users/adminstrators except the original one?
- 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
- Using TinyMce with textareas in meta boxes on custom post types
- Unable to login to my wordpress site. reauth=1 redirection loop
- wp_list_tables bulk actions
- Highlight custom widgets in the admin area?
- Hook the Keydown Event in the TinyMCE Post Editor
- 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
- How to wrap admin menus and menu headers in additional divs without modifying the WordPress core?
- Display sortable User meta column in admin panel user’s page
- wp-login.php — redirect logged in users to custom URL
- Hooking into register_admin_color_schemes
- How can I add an extra admin column showing the word-count of a page or post?
- Upload media file problem
- comment_form – show all fields when logged in
- Always show same size tags for Tag Cloud in WordPress Admin
- Why should I password protect WP-Admin?
- Using /wp-admin works, using /login gives a 404. Why?
- Using List Table Filters for ALL Custom Post Types
- In the WordPress admin, how can I find out which page (themes.php, widgets.php, etc.) I’m on?
- What is the practical difference between is_admin() and is_blog_admin()?
- How do I set the homepage to the WordPress Admin Dashboard login?
- Today, without warning, all admin panel logins redirect to home page after login. non-admin users logins work well
- Reusable content block
- Wrong wp-admin URL
- What is wrong with this code to remove wp admin bar from one page
- Admin search not working for any type of post
- admin_post action not usable if admin access denied to user
- Adding Custom Capabilites
- Removing the TinyMCE editor for a given page template
- Display checked in checkbox theme admin page when reloaded
- Why is unfiltered_upload not working despite being enabled?
- List All Enqueued Scripts and Styles
- Add menu option to “New Post” menu in admin bar
- Linking table cells to network folders
- Remove bulk option row
- How can I disable all external url Google in WordPress backend?
- if it possible to get all notifications from all plugins and core?
- wp-admin page redirecting to 404 error page
- Require Login Redirect to Login Page
- ASCII to Unicode conversion and then save the data into database using WP post editor field
- How to fix ob_end_flush() failed to send buffer of zlib output compression (1)?
- How to replace “Password Protected” text with icon in Admin
- 100+ terms in any taxonomy slows down post updates?
- Is WordPress Suitable for my site?
- Disable or lock parent pages from being edited in wordpress admin
- How login is possible, if I deny login page via .htaccess with allow ip
- Unable to display WordPress admin bar in the frontend as an admin
- Delete the “wp-admin” folder – what could go wrong?
- unsuccessful attempt to change domains- wordpress re-routing to old domain
- How can I limit page parent dropdown to show only author’s own pages?
- Icons are missing from Visual Editor
- how can provide access to wp_admin page for non wp_users?
- Creating custom admin panel pages without making a plugin?
- jQuery UI Datepicker error
- TinyMCE custom button retrieve value from custom field
- Change users.php WP_User_Query
- Can’t connect to WP-Admin, blank error message
- Blank page when viewing wp-admin
- Is it possible to display my theme sidebar in wordpress admin?
- 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
- Strange wp admin edit buttons issue
- 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
- Not able to access WP admin Page, redirected and a drop down login menu appears 401 error
- 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?
- 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]
- My website’s wp-admin redirects to another website’s wp-admin after pointing the site url to a subdirectiory
- Help please i cant login to wordpress panel [closed]
- Https Website: CSS and JS files load in http and admin page does not load too