Forums

The Bootstrap
[resolved] Child theme for "The Bootstrap": parent’s stylesheet loaded? (3 posts)

  1. fb16
    Member
    Posted 8 months ago #

    Hi Konstantin,

    on a child theme for "The Bootstrap" folder, I have only 1 file: style.css and I was expecting that it could replace the stylesheet of the parent completely, so that the parent's stylesheet is not loaded at all by WordPress.

    Looking at the browser source instead, I notice that both the files are loaded:

    <link rel='stylesheet' id='the-bootstrap-css'  href='http://xlskj5h/wp-content/themes/the-bootstrap/style.min.css?ver=0.1.0' type='text/css' media='all' />
    <link rel='stylesheet' id='the-bootstrap-child-css'  href='http://xlskj5h/wp-content/themes/child-the-bootstrap/style.css?ver=3.4.1' type='text/css' media='all' />

    Is it ok the double referencing to the "style.css" above? How could I reference to the child theme stylesheet, only?

    Thank you

    fb

    http://wordpress.org/extend/themes/the-bootstrap/

  2. Konstantin Obenland
    Theme Wrangler
    Posted 8 months ago #

    When a Child Theme is active, The Bootstrap automatically registers the parent's style.css as a dependency for the child's style.css.

    You could hook into 'wp_enqueue_scripts' with a priority higher than 10, dequeue 'the-bootstrap-child' and re-enqueue it without the dependency.

  3. fb16
    Member
    Posted 8 months ago #

    Hi Konstantin,

    perfect! I realize only now that it was something related on how WordPress works (dependencies), sorry :)

    Anyway thank you for the quick and effective reply

    Best regards

    fb

Reply

You must log in to post.

About this Theme

About this Topic