0

Hello,
I am currently running wordpress 3.5.1 and have been looking to implement media queries on my website to make it a responsive design. I currently have two key CSS files:
wp-content/themes/twentytwelve/style.css?ver=3.5.1
wp-content/themes/twentytwelve/css/base.css
The first CSS file ‘style.css?ver=3.5.1’ contains styling from wordpress and the second CSS file ‘base’ contains my own custom CSS. The problem is the ‘style.css?ver=3.5.1’ file is loading before the base.css file and overriding any styling in base.css - after doing some research I can see I probably need to put in place wp_enqueue_style() function, but for some reason it’s not working.
Can anyone help?
Cheers
Paul

1
Contributor
1
Reply
8
Views
2 Years
Discussion Span
Last Post by pedal123
0
<?php
wp_register_style( 'base', get_template_directory_uri() . '/wp-content/themes/twentytwelve/css/base.css', array(), false, 'all' );
?>
<?php
function theme_name_scripts() {
    wp_enqueue_style( 'base', get_stylesheet_uri() );
    wp_enqueue_script( 'base', get_template_directory_uri() . '/wp-content/themes/twentytwelve/css/base.css', array(), false, 'all' );
}

add_action( 'wp_enqueue_scripts', 'theme_name_scripts' );
?>
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.