How to load a CSS file into WordPress admin area using Child Theme? [closed]

You need to use admin_enqueue_scripts hook to load CSS in admin area. This goes in your themes functions.php. Assumed that your file is at child_theme_path/css/admin-css.css function wpse239532_load_admin_style() { wp_enqueue_style( ‘admin_css’, get_stylesheet_directory_uri() . ‘/css/admin-css.css’, false, ‘1.0.0’ ); } add_action( ‘admin_enqueue_scripts’, ‘wpse239532_load_admin_style’ );

How do you modify CSS files via admin panel?

If you’re wanting styles to be dynamic, then you’ll have to emit your CSS file as you are suggesting. However, as WordPress often uses styles.css as a theme definition file, renaming styles.php might cause problems. It might be better to collect all the ‘dynamic’ definitions into a separate file (eg dynamic-styles.php) and import them from … Read more

500 Internal Server Error after Register dialog, but with successful registration

Internal Server errors are usually thrown when there’s an error somewhere in the code. You did the right thing searching the logs, but depending on your hosting configuration not all errors can be written there. I like using WordPress’s own logging facility. Here’s what you need to do: Stick the following lines in your wp-config.php … Read more

Color picker for posts and pages

I have found the solution on Denis Žoljom’s post 1) – I have added the metabox like this add_action( ‘add_meta_boxes’, ‘mytheme_add_meta_box’ ); if ( ! function_exists( ‘mytheme_add_meta_box’ ) ) { function mytheme_add_meta_box(){ add_meta_box( ‘header-page-metabox-options’, esc_html__(‘Header Color’, ‘mytheme’ ), ‘mytheme_header_meta_box’, ‘page’, ‘side’, ‘low’); } } 2) – enqueue the color picker style and script add_action( ‘admin_enqueue_scripts’, … Read more

File exceeds upload_max_filesize, despite max filesize being large enough

Apparently there’s an upload_size_limit filter in WordPress. To check what your site’s upload limit is set to, add this to your theme’s functions.php: add_action( ‘shutdown’, ‘wpse115322_upload_sizes’, 99 ); function wpse115322_upload_sizes() { $size = wp_max_upload_size(); $kb = $size/1024; $mb = $size/(1024*1024); echo( “$kb KB / $mb MB<br />\n” ); } That’ll print your site’s actual max … Read more