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 get the URL for a file in a child theme is get_theme_file_uri(): function wp245372_admin_enqueue_scripts() { wp_enqueue_style( ‘my-admin-css’, get_theme_file_uri( ‘my-admin.css’ ) ); } add_action( ‘admin_enqueue_scripts’, ‘wp245372_admin_enqueue_scripts’ );

What is the colors handle from WordPress core for and why does it not have a path?

The colors handle is for the “Admin Color Scheme” stylesheet (see the Users → Profile page at wp-admin/profile.php) and it’s registered via wp_default_styles(), like so: ( $styles is an instance of the WP_Styles class which extends the WP_Dependencies class which has an add() method where the second parameter is the stylesheet path ) // Register … Read more

Proper use of wp_enqeue_style

Two problems: You only need to provide the script path once, either in the wp_register_style() call, or in the wp_enqueue_style() call, but not both. (In fact, in this context, it would be fine to omit the wp_register_style() call entirely, and just use the wp_enqueue_style() call.) You’re hooking into the wrong action. Try hooking into wp_enqueue_scripots … Read more

Enqueuing a stylesheet and ensuring it’s loaded before (not after) the theme’s stylesheet

By default, themes usually almost always enqueue scripts and style via the wp_enqueue_scripts hook with default priority set in add action. This is the add_action() statement by default add_action( ‘wp_enqueue_scripts’, ‘my_custom_styles_and_scripts’ ); As you can see, a priority is not set in the action, which means that it will default to 10. With this in … Read more

CSS only loads in backend

The action for adding scripts and styles is wp_enqueue_scripts, scripts is plural. The function for adding a script is wp_enqueue_script, script is singular. add_action( ‘wp_enqueue_scripts’, ‘load_top_bar_style’ );

enqueue_parent_style

I think if you change your wp_enqueue_style to the one below it will work perfectly. This is the way I do it inside my own functions.php file. function wpse_scripts() { // Theme Stylesheet wp_enqueue_style(‘style’, get_stylesheet_uri()); } add_action(‘wp_enqueue_scripts’, ‘wpse_scripts’); Although you can do it the way your doing it, it’s just you’ve added a / before … Read more

stylesheet in header or functions?

wp_enqueue_style has a 5th parameter that represents the media attribute. https://developer.wordpress.org/reference/functions/wp_enqueue_style/ You could do the following to load this correctly: wp_enqueue_style( ‘stylecss’, get_stylesheet_uri(), array(), false, ‘screen’ ); Hope it helps!

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)