26 votes

No CSS being loaded on backend

Adding these two lines to "wp-config.php" worked for me. I had the same issue. define( 'CONCATENATE_SCRIPTS', false ); define( 'SCRIPT_DEBUG', true ); Also, remember to clear cache on server and ...
Suresh KUMAR Mukhiya's user avatar
12 votes

No CSS being loaded on backend

In wp-config.php before require_once add below code into file : define('CONCATENATE_SCRIPTS', false);
thSoft's user avatar
  • 221
11 votes
Accepted

How to add custom css to login and admin?

That's pretty fine and it's the proper way to add CSS to login page. But you can also change login page CSS by below code- function the_dramatist_custom_login_css() { echo '<style type="text/...
CodeMascot's user avatar
  • 4,507
9 votes
Accepted

wordpress wp-admin css not loading

I had the same issue a few months back I tried this and this works for me. define('FORCE_SSL_LOGIN', false); define('FORCE_SSL_ADMIN', false); define( 'CONCATENATE_SCRIPTS', false ); define( '...
Tejas Gajjar's user avatar
6 votes

No CSS being loaded on backend

First of all visit: how to fix wordpress admin style problem it is possible that one plugin incorrectly enqueued some style or jquery file in the wp-admin/load-styles.php file, change "...
Arash Rabiee's user avatar
5 votes

No CSS being loaded on backend

I had the same problem and tried the above suggestions first, but they didn't work. Then I realized my issue was coming from mixed content being delivered and I found this answer, which references ...
displacedtexan's user avatar
4 votes
Accepted

How to stop my themes CSS changing the Wordpress interface/?

This can happen if the function for enqueueing stylesheets, wp_enqueue_style() is run inside functions.php outside of a hooked function, like this: <?php wp_enqueue_style( 'my-style', ...
Jacob Peattie's user avatar
4 votes
Accepted

Changing Gutenberg / WP block editor width only on pages, not posts or other taxonomies

Because the WordPress hook add_theme_support( 'editor-styles' ); adds the css in the style-editor.css and appends the class .editor-styles-wrapper before my .wp-block, the usage of the body classes ...
andiOak's user avatar
  • 171
3 votes

No CSS being loaded on backend

I found that my wordpress was set to http:// but I had installed a certificate and needed https:// Changing the default to https:// in wordpress settings fixed it.
Keith Teare's user avatar
3 votes

Add custom CSS for plugin admin Page

It's likely because plugins_url() returned an invalid URL like so: ( note the wp-cricket-info/wp-cricket-info/ ) https://example.com/wp-content/plugins/wp-cricket-info/wp-cricket-info/assets/css/...
Sally CJ's user avatar
  • 38.7k
2 votes

How do i use fontawesome icons in TinyMce editor?

Here is a greatly simple solution for this. Firstly add the FontAwesome library to WordPress Backend by creating and adding it to admin_init function fontawesome_dashboard() { wp_enqueue_style('...
Pito Axiu's user avatar
2 votes

How do i use fontawesome icons in TinyMce editor?

I tested the following on WordPress 4.6.1 I originally looked up this process to help create a button that would produce a shortcode. Based on some various posts, I originally used the following ...
klewis's user avatar
  • 857
2 votes
Accepted

What exact CSS minifier does WP core use?

Before: add_action('admin_head', function(){ ?> <style type="text/css"> #wpadminbar #wp-admin-bar-wp-logo > .ab-item .ab-icon::before { content: "LOL"; top: 2px;...
Adam's user avatar
  • 16.4k
2 votes
Accepted

Distributing Frontend Assets with Plugins

1 - it's up to you and subject to opinion, so not best suited to WPSE. 2 - Never hardcode paths. WP has whole range of functions for finding file paths and URLS. plugins_url() will get you the full ...
Andy Macaulay-Brook's user avatar
2 votes
Accepted

Adjust the Device Preview sizes used in the WP 4.5 Customizer

Both the mobile and the tablet dimensions are defined in the admin's themes.css file. The javascript that runs when the buttons are triggered is just for adding and removing classes and not for ...
Luis Sanz's user avatar
  • 746
2 votes

enqueue admin styling and scripts only on plugin page

You can use $screen = get_current_screen(); functions to get the current screen and add warp your enqueue method with the if conditions to check the screen. https://codex.wordpress.org/...
dazunE's user avatar
  • 210
2 votes
Accepted

Change css for <p> tag in wordpress admin

If you're trying to change the styles of the wysiwyg editor, which I assume you are based on your code example, you need to use the add_editor_style() function. As per the example in the code ...
Antti Koskinen's user avatar
2 votes
Accepted

How to add a class to the <InnerBlocks.ButtonBlockAppender /> element in a custom Gutenberg block

That documentation is for the base ButtonBlockAppender component in the @wordpress/block-editor package, and that component is exported with the name ButtonBlockerAppender (note the "Blocker"...
Sally CJ's user avatar
  • 38.7k
2 votes
Accepted

make admin.css in my child theme

The get_template_directory_uri() function gets the URL to the parent theme. The equivalent function for child themes is get_stylesheet_directory_uri(). However these days the proper function to use to ...
Jacob Peattie's user avatar
2 votes
Accepted

Add custom CSS for plugin admin Page

I guess you're using this code in a wrong file other than the main plugin file (usually /wp-content/plugins/wp-cricket-info/wp-cricket-info.php). So, the file you're referencing when enqueueing is ...
mukto90's user avatar
  • 1,324
1 vote
Accepted

Change the color of the Password Protected Post titles

To change the color of password protected post titles in the admin In your theme or child theme, enqueue a stylesheet to load in the admin, then add some simple CSS to change the color using the ...
RiddleMeThis's user avatar
  • 3,757
1 vote

Gutenberg Block Editor Match Admin Styles & Frontend Styles

The Editor itself doesn't have much in the way of visible styling; it's more to ensure consistency across Editor components themselves, like buttons and info panels. You are meant to apply styles ...
WebElaine's user avatar
  • 9,370
1 vote
Accepted

Different css rules for TinyMCE and Gutenberg while using add_editor_style()

SHORT VERSION Using css it's possible to use of the :not() selector to exclude Tinymce instances, e.g. body:not(.mce-content-body) {...} LONG VERSION Let's assume we have declared theme support ...
Cerere's user avatar
  • 231
1 vote

Is it possible to load the css just on my plugin admin page?

To answer the question, from the codex, listed above in the comments. function load_custom_wp_admin_style($hook) { // Load only on ?page=mypluginname if($hook != '...
RiddleMeThis's user avatar
  • 3,757
1 vote
Accepted

Override Admin menu icon

One way is to use the admin_menu hook to insert CSS with your selection of menu icons (which use the DashIcons). The googles show this recent result: https://swapnil.blog/2018/06/25/how-to-change-...
Rick Hellewell's user avatar
1 vote

Enqueue a file that's not js or css

You could also look to create a special CSS file that you setup an htaccess rewrite rule for. For example wp-content/yourtheme/custom.css And then add a rule in your htaccess: RewriteEngine On ...
Alexander Holsgrove's user avatar
1 vote
Accepted

Add css code in admin_enqueue_scripts

If you're using the admin_enqueue_scripts hook, use wp_enqueue_script() to enqueue a CSS file with the styles you want to apply. If you want to output a <style></style> element use the ...
Jacob Peattie's user avatar
1 vote
Accepted

Apply custom css for user role

To enqueue CSS in WordPress you can use: wp_enqueue_scripts action for the frontend login_scripts action for the login page admin_scriptsaction for the admin side, as you already know To check user'...
cybmeta's user avatar
  • 20.4k
1 vote
Accepted

How to reference an existing css content-based icon, within my admin menu hook

Wordpress uses Dashicons. Basically you would replace your code with this: add_menu_page('Cool Plugin Page', 'Cool Plugin', 'manage_options', 'my_main_menu','my_main_plugin_page', 'dashicons-admin-...
Enthusiast's user avatar
1 vote
Accepted

Margin problem on management menu?

You can't modify Wordpress' admin CSS. Well, technically you could, but it'd just get overridden the next time you update Wordpress. The solution to this is to add your own custom CSS file to ...
Tim Malone's user avatar
  • 4,724

Only top scored, non community-wiki answers of a minimum length are eligible