- This topic has 4 replies, 2 voices, and was last updated 9 years, 9 months ago by
sebastienserre.
-
AuthorPosts
-
February 25, 2014 at 9:38 pm #4837
sebastienserre
MemberHello
it seems crazy but I can’t modify in a child theme the php file wp-content/themes/agile/css/skins/skin.php
neither by creating in the child folder a skin.php nor by re producing in the child folder /css/skins/skin.php
Is someone can help me please?
Many thx
February 26, 2014 at 1:43 pm #4855Raghavendra
ModeratorThe skin.php file is actually a type of dynamically generated CSS file coded with the help of PHP. This PHP file is loaded outside of WordPress and hence it won’t help you override the same.
I was curious about the kind of change you want to make in this file since all it is doing is changing the color of background/text for a number of elements upon skin change for the theme. If you need to, you can define your own CSS file to override it but I wouldn’t remove it altogether.
If you need to define a similar skin file of your own in the child theme. You can do the following in child theme functions.php file after creating your skin.php file in the child theme folder –
add_action('after_setup_theme', 'register_skin_styles'); function register_skin_styles() { $skin_color = mo_get_theme_skin(); if ($skin_color !== 'default') { $skin_stylesheet_dir_uri = get_stylesheet_directory_uri() . '/css/skins/'; wp_register_style('child-style-skin-php', $skin_stylesheet_dir_uri . 'skin.php?skin=' . urlencode($skin_color), array('style-theme'), false, 'all'); wp_enqueue_style('child-style-skin-php'); } }
If you really need to remove the parent skin.php file from loading, you can do the following in your child theme functions.php file –
add_action( 'wp_print_styles', 'my_deregister_styles', 100 ); function my_deregister_styles() { wp_deregister_style( 'style-skin-php' ); /* The parent skin stylesheet handle */ }
Hope this works for you.
February 26, 2014 at 2:00 pm #4856sebastienserre
MemberHello and many thx for your detailed answer
I’d like to modify the back-ground colour of #title-area (red io orange) but when I had
`#title-area {
background-color: red;
}
in my style.css (child) it doesn’t override the default.February 27, 2014 at 12:24 pm #4879Raghavendra
ModeratorPls see some related discussion here on how to handle these cases in WordPress. You are better off creating a new CSS file as suggested there.
https://www.livemeshthemes.com/support/forums/topic/child-theme-css-overrides/
If you have only couple of overrides, you can do –
#title-area { background-color: red !important; }
February 27, 2014 at 1:30 pm #4890sebastienserre
MemberMany thx I will check the link as the tip
`#title-area {
background-color: red !important;
}
Doesn’t override -
AuthorPosts
- The forum ‘Agile Theme Support’ is closed to new topics and replies.