Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress

Brandon Stiles
Brandon Stiles
12,305 Points

Wordpress theme not correctly importing Bootstrap 4/CSS

I'm trying to build a WP theme, and have been following the 'WP for Bootstrap' and 'WP Theme Development' course to the letter, but can't get my static home page to format correctly.

I'll try and show everything I'm doing and maybe yall can help show me where I'm going wrong.

Here's a link to some Imgur images with all my code and what's going wrong: http://imgur.com/a/4vpIy

1 Answer

Rich Donnellan
MOD
Rich Donnellan
Treehouse Moderator 27,696 Points

Hard to say, but here are a couple suggestions:

  1. Move wp_enqueue_style('bootstrap_css', 'css/bootstrap.min.css'); to the // Import CSS declarations
  2. Be consistent with your relative paths (e.g. /css/ vs. css/ — the latter being the correct usage and fixed in the first point)

I have a feeling number dos is key.

Brandon Stiles
Brandon Stiles
12,305 Points

Thank you, RIch! I'm gonna give that a try and play around with it a little