• Hello,

    is it possible that you change the order of the css, so that the style.css is enqueued after the blog- and bootstrap-css?

    Now it′s a little bit annoying because if I make a child-theme my style.css is loaded before blog- and bootstrap-css and I can′t overwrite things without an extra body-class or !important.

    Thanks,
    Jan

Viewing 5 replies - 1 through 5 (of 5 total)
  • L

    (@elliotrball)

    I had the exact same problem as you, the order seems silly to me since I would normally use bootstrap as a base and overwrite all the styles in style.css.

    To fix this go to functions.php and on line 132 you should see this (or do a search for the code)

    wp_enqueue_style( 'style-css', get_stylesheet_uri() );
    	wp_enqueue_style( 'blog-css', get_template_directory_uri() . '/css/blog.css' );
    	wp_enqueue_style( 'bootstrap-css', get_template_directory_uri() . '/css/bootstrap.css', '3.3.0' );

    You just need to move the first line that references the style.css file below the bootstrap file and that’s it. This would also override the blog-css file, but I’m sure thats enough to solve your problem.

    Take a look at my upcoming mobile app? Habitual

    Source: https://themes.trac.www.ads-software.com/changeset/41869/bootstrap-canvas-wp/1.91/functions.php?old=41729&old_path=bootstrap-canvas-wp%2F1.90%2Ffunctions.php

    Thread Starter Virtualizer

    (@virtualizer)

    Yeah, thanks. I did that already. And it works fine of course. But there remains the bad aftertaste of editing the original source which I always try to avoid.

    Regards,
    the Virt

    L

    (@elliotrball)

    Tastes better than adding a !important after every line of css. I don’t really mind editing the source if it fits my purpose better and I know it’s not likely to cause any big problems.

    Thread Starter Virtualizer

    (@virtualizer)

    Ok, but won’t your changes be overridden after updating the parent theme?

    L

    (@elliotrball)

    hmm, you’re totally right. To be honest I’ve never needed to update a theme before and I can’t imagine I would ever want to update the parent theme. Even if I didn’t make any changes to it, it could still cause problems with my child theme. For example if they add in a new style and use !important I would have to update my child theme, that’s why I don’t see much of an advantage to updating. I could be wrong.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘css order’ is closed to new replies.