Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

WordPress

Mark Chamberlain
Mark Chamberlain
1,972 Points

style sheet not loaded all the way?

I am following the bootstrap on wordpress. I have added.

<?php

function theme_styles() {

    wp_enqueue_style( 'bootstrap_css', get_template_directory_uri() . '/css/bootstrap.min.css' );


    wp_enqueue_style( 'main_css', get_template_directory_uri() . '/style.css' );

}

add_action( 'wp_enqueue_scripts' , 'theme_styles' );

function theme_js () {

wp_register_script( 'html5_shiv','https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js', '','', false );

}

?>

into the function php. but the site does show the theme code loaded on there. how ever the theme has come through in some bits i.e the contaner and button styles.

any ideas?

2 Answers

is this a new site? are you using gulp or grunt?

Mark Chamberlain
Mark Chamberlain
1,972 Points

yes it is a new site and what is gulp or grunt?

gulp/grunt are javascript task managers that do a lot of things to process files when developing. One of the big things is using a watch command to compile sass to css. I take it that the bootstrap's sass files and compiles them. Here is a really good blog post about enqueueing styles:

blog post