You can simply add those CSS to admin HEAD section, it’s fast and easy solution.
function jrl_styles() {
?><style type="text/css">
#jrl-wrap {
width: 700px;
padding: 3em;
/* ... */
}
</style><?php
}
add_action('admin_head', 'jrl_styles');
Or you can enque your CSS file like this:
function load_custom_wp_admin_style() {
wp_register_style( 'custom_wp_admin_css', get_stylesheet_directory_uri() . '/functions/site-options.css', false, '1.0.0' );
wp_enqueue_style( 'custom_wp_admin_css' );
}
add_action( 'admin_enqueue_scripts', 'load_custom_wp_admin_style' );
Both options will add those CSS code (or file) to every admin page, so have your CSS definiton prefixed to aviod some collisions with WordPress CSS. Your CSS code looks OK.
Edit: Changed get_template_directory_uri()
(always returns parent theme folder) to get_stylesheet_directory_uri()
(returns child-theme folder).
Related Posts:
- Is it possible to disable a function of a parent theme?
- How to override an unpluggable parent theme function?
- How do I remove a require_once admin panel from the parent theme from the child theme functions.php?
- Copyright info change in Theme Child PHP
- Add footer.php to WordPress child theme
- Best way of adding CSS which can be manipulated by the user via theme option panels?
- Setting up the child theme so as to enable right-to-left WordPress?
- How to override a non pluggable and non hookable function in a WordPress parent theme?
- Understanding WordPress child theme custom JS loading
- Understanding child theme functions.php
- Overriding a theme redux file in child theme
- Want to create Child theme, but already edited Parent theme css files and some php files
- Using PHP to toggle stylesheet and header image, set in cookie
- Adding tawk.to code just before body tag on functions.php file
- Shortcode content output but not in correct place
- WordPress child theme fails to override parent navigation menu in /inc/structure/header.php
- Hide Hamburger Menu On Specific Page (Front Page/Home Page)
- Parent theme CSS overriding child CSS rules
- Css loads very slow [closed]
- two columns of posts on homepage, one of them “favorites”
- responsive.css in the WordPress should be prioritized
- Custom Background by Page IDs
- Copyright info change – Corporate Plus Theme PHP [closed]
- height should be set to auto to avoid pixelation in the post thumbnail function
- How to make container class in PHP
- Creating a mobile site by adding a new class to the body tag from functions.php
- How do I check or test a WordPress Auto Year Change Script?
- How to have different site identity logos on each page on Astra Theme [closed]
- CSS change in woo commerce Place Order Text [closed]
- Problem with adding custom CSS class to image in ACF Photo Gallery plugin [closed]
- Removing “Powered by” footer using child theme PHP [closed]
- Overide Variable in Child Theme
- child parent styles enqueue order
- How to style injected code in header section?
- Child Theme’s Read More Text
- Need advice on theme customizer and child themes
- How to edit background color of only one sidebar?
- Inline CSS header style priority function.php Child (no enqueing I think)
- how to changes mobile menu toggle breakpoint in WordPress
- Why would the child theme load in the Customize preview, but not on the site itself?
- PHP function for horizontal Woocommerce thumbnails and badges
- Proper way to remove html code on child theme
- remove_action from parent theme using child theme functions.php
- File from parent theme imported to child theme doesn’t work – any ideas?
- Problem with displaying CSS Stylesheets – Am I adding them correctly in my wordpress child theme?
- How to change this ajax function to submit to the default wordpress content area instead of the custom field ‘seller notes’?
- Child theme overirde template-tags in a theme built on underscores in inc/template-tags
- PHP “warning include_once(): Failed to open stream” Simple HTML DOM in WordPress Child Theme
- I got big white screen when i attach main style sheet of Html in functions.php
- How to locate parent theme functions and add functions to my wordpress child theme?
- How to let mobile navigation menu close when link is clicked?
- how to add functions to my function.php using a child theme?
- Site title not showing. Please help me
- PHP/CSS: Shortcode won’t display correctly, and only displays in the head (before content)
- Add class for the_post_thumbnail_caption()
- Displaying POST content with HTML tags and all
- Highlight Single Page Ancestor
- Where to find the html for WordPress site? [closed]
- How to remove image on single product and get product to span page?
- Removing get_template_part in child theme
- Modify arguments for parent theme’s `wp_register_style` via child theme
- Styling admin page rows in order of importance (checkboxes)
- How to have Function of a plugin using global vars into a shortcode?
- Child theme not working properly
- Cant get theme to change footer color through theme customizer
- How to add margin underneath woocommerce total price amount -> productpages
- How do I get Roboto Google Font to display normal font-style? [closed]
- Integrating CSS Into a WP Function Call [closed]
- Load slideshow.css file only if Slideshow is checked / on
- Child-theme suddenly stopped working [closed]
- Sorting Problem
- How to redirect users to custom lostpassword page?
- Can I write ‘RewriteCond’ using ‘functions.php’?
- Get widget settings function?
- Archive dropdown styling not applied
- WordPress Quick Question . How to Get Parent Link in Submenu in My Code
- Is the “_s” on this `sprintf(__(‘Page %s’, ‘_s’), max($paged, $page))` just refer to a text domain?
- Exclude category
- What exactly do this function declared into functions.php file of a WP theme?
- WordPress wp_add_inline_style unable to give hex colors?
- Co-Authors Plus: How do I get all authors with a query?
- Why i can’t get custom fields value or post ID via Ajax?
- How to reference PHP in Javascript
- making php value numeric
- How to assign page id with array in page_scheduled_event
- Uncaught TypeError: extract(): Argument #1 ($array) must be of type array, null given
- Cannot find the php_ini configuration file to find my error log to see why my code is not working
- How to Send Pingbacks for all Posts in WordPress?
- HTML comment cause issue in functions.php script root
- Cannot dequeue Elementor Font Awesome css
- How to find and delete a menu item in php?
- WordPress Ajax filter: Create two loops for different output styles?
- How to call a function from functions.php with ajax?
- Showing wordpress latest post thumbnails in slider with auto increment
- Custom Thumbnails [closed]
- My function echos only “array”
- Notify admin (by email) if post added with specific tag
- Limit Taxonomy Parents
- How to add button to top of theme customizer?
- Options.php loop won’t show!