• Hi All,

    Could someone please assist me with creating a child theme. I’ve followed the article on the following link (https://codex.www.ads-software.com/Child_Themes) but my CSS modifications do not seem to be taking place…

    Here is the code I put in my new child style.css saved under directory wp-content/themes/swift-child

    —————–QUOTE—————–
    /*
    Theme Name: Swift Child
    Theme URI: https://idealfurn.com/
    Description: Child theme for the Swift theme
    Author: James Kelly
    Author URI: https://idealfurn.com/about/
    Template: swift
    Version: 0.1.0
    */

    @import url(“../swift/style.css”)

    body {background: #FFF;}

    —————-UNQUOTE—————-

    Can you please advise if I am missing something?

    Do I not need to link the new child style.css with the template? i.e. <link href=”styles.css” rel=”stylesheet” type=”text/css” /> – if so, should this not be included in the article I’ve attached

    Could someone please advise?

    Thanks & Regards
    James

Viewing 3 replies - 1 through 3 (of 3 total)
  • Have you tried using Firefox Firebug, or Chrome Developer Tools, to determine what CSS rules are being applied?

    Thread Starter jamessk

    (@jamessk)

    Hi Chip,

    Thanks for your response.

    I’ve checked within Chrome Developer tools and it seems to be loading a sheet called custom_style.css which I’ve now located, so I’ve tried importing this file to my new child style.css but it still does not seem to be working..

    Here is a snippet of my new code within

    —–

    /*
    Theme Name: Swift Child
    Theme URI: https://idealfurn.com/
    Description: Child theme for the Swift theme
    Author: James Kelly
    Author URI: https://idealfurn.com/about/
    Template: swift
    Version: 0.1.0
    */

    @import url(“../swift/style.css”)
    @import url(“../wp-content/uploads/swift_custom/custom-style.css”)

    body {background: #FFF;}

    ——

    Can you provide any advice or guidance?

    Thanks & Regards
    James

    Can you just move the style definitions from custom-style.css into your Child Theme’s style.css?

    What’s happening, if you look at header.php, is that the Theme loads style.css first, and then loads custom-style.css, so anything in custom-style.css will override anything in your Child Theme’s style.css.

    There are ways to work around it, but would involve adding a modified header.php template file to your Child Theme.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Child Theme’ is closed to new replies.