Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • #4837


    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


    The 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');

    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.


    Hello 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.


    Pls 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.

    If you have only couple of overrides, you can do –

    #title-area {
    background-color: red !important;

    Many thx I will check the link as the tip
    `#title-area {
    background-color: red !important;
    Doesn’t override

Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘Agile Theme Support’ is closed to new topics and replies.