• How do I add CSS to a Child Theme?
    I am making a child theme.

    I am trying to put these CSS codes into it, but I don’t know how.

    #comment-form .form-allowed-tags {
    display:none;
    }
    .footer-navi .right-navi {
        display: none;
    }
    .footer-navi .navigation ul.footer_des {
        width: 500px;
    }

    So far I only have the start of the Child theme.

    /*
    Theme Name:     Colorway Child Theme
    Description:    Child theme for the Colorway theme.
    Author:         Bud's Software
    Template:       Colorway
    Version:        .1
    */

    Please Help

Viewing 14 replies - 1 through 14 (of 14 total)
  • Your site does not have the child theme activated and you are missing the @import line – it should be:

    /*
    Theme Name:     Colorway Child Theme
    Description:    Child theme for the Colorway theme.
    Author:         Bud's Software
    Template:       colorway
    Version:        .1
    */
    
    @import url ('../colorway/style.css');

    Also uncapitalize “colorway” after “Template”

    After you’ve changed those you must activate the child theme.

    Thread Starter Matthew

    (@kidsguide)

    How do I Activate it?

    Thread Starter Matthew

    (@kidsguide)

    Do I just do it like this?

    /*
    Theme Name:     Colorway Child Theme
    Description:    Child theme for the Colorway theme.
    Author:         Bud's Software
    Template:       colorway
    Version:        .1
    */
    
    @import url ('../Colorway Child Theme/style.css');
    
    #comment-form .form-allowed-tags {
    display:none;
    }
    
    .footer-navi .right-navi {
        display: none;
    }
    
    .footer-navi .navigation ul.footer_des {
        width: 500px;
    }
    Thread Starter Matthew

    (@kidsguide)

    This is what I have done.

    /*
    Theme Name:     Colorway Child Theme
    Description:    Child theme for the Colorway theme.
    Author:         Bud's Software
    Template:       colorway
    Version:        .1
    */
    
    @import url ('../Colorway Child Theme/style.css');
    
    <?php
    
    #comment-form .form-allowed-tags {
    display:none;
    }
    
    .footer-navi .right-navi {
        display: none;
    }
    
    .footer-navi .navigation ul.footer_des {
        width: 500px;
    }
    
    ?>
    
    <?php
    _e( 'Code is Poetry', 'colorway-child-theme' );
    ?>

    PHP tags can never go in a CSS file – take those out.

    And this line is not correct:

    @import url ('../Colorway Child Theme/style.css');

    Look at my example above.

    Thread Starter Matthew

    (@kidsguide)

    Like this

    /*
    Theme Name:     Colorway
    Description:    Child theme for the Colorway theme.
    Author:         Bud's CSS Plugins
    Template:       colorway
    Version:        .1
    */
    
    @import url ('../colorway/style.css');
    
    #comment-form .form-allowed-tags {
    display:none;
    }
    
    .footer-navi .right-navi {
        display: none;
    }
    
    .footer-navi .navigation ul.footer_des {
        width: 500px;
    }
    
    _e( 'Code is Poetry', 'colorway-child-theme' );

    Take out this line :

    _e( 'Code is Poetry', 'colorway-child-theme' );

    And activate the child theme –

    http://codex.wordpress.org/Using_Themes#Selecting_the_Active_Theme

    Thread Starter Matthew

    (@kidsguide)

    When I upload it it goes

    The package could not be installed. PCLZIP_ERR_BAD_FORMAT (-10) : Unable to find End of Central Dir Record signature

    This is the finished Child Theme

    /*
    Theme Name:     Colorway
    Description:    Child theme for the Colorway theme.
    Author:         Bud's CSS Plugins
    Template:       colorway
    Version:        .1
    */
    
    @import url ('../colorway/style.css');
    
    #comment-form .form-allowed-tags {
    display:none;
    }
    
    .footer-navi .right-navi {
        display: none;
    }
    
    .footer-navi .navigation ul.footer_des {
        width: 500px;
    }
    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    When I upload it it goes

    Can you upload it via FTP?

    Or if it’s just a style.css file you need to use, try using this One Click Child Theme.

    Are you using FTP to upload it to your themes folder?

    wordpress
       wp-content
         themes
           colorway
           other themes will be in here too
           colorwaychild (must go here)
    Thread Starter Matthew

    (@kidsguide)

    Or if it’s just a style.css file you need to use, try using this One Click Child Theme.

    I tried it but it said “error”.

    Thread Starter Matthew

    (@kidsguide)

    What does FTP stand for?

    Thread Starter Matthew

    (@kidsguide)

    I don`t think I am going to make a Child Theme.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘How do I add CSS to a Child Theme’ is closed to new replies.