WordPress development tutorial on how to properly load CSS and javascript into a WordPress theme, Twitter Bootstrap is used.
Related Posts
21 Comments on “WordPress Development Tutorials: Twitter Bootstrap your theme”
Comments are closed.
The Entrepreneur's Hangout
Thanks for this tutorials!
Doesnt work for now, checked twice.
Parse error: syntax error, unexpected ''/css/bootstrap.min.css'' (T_CONSTANT_ENCAPSED_STRING) in D:WorkXAMPPhtdocstestwp-contentthemesmythemefunctions.php on line 11
that part is
wp_enqueue_style(
'bootstrap-styles',
get__template_directory_uri() '/css/bootstrap.min.css'
);
Make sure to put a period after "get_template_directory_uri()". Missed that myself.
bloginfo('name') and functions.php doesn't work for me…
May be something with php on my machine?
Very good !
I had a problem with an obvious typo. there are two functions in wordpress one is wp_enqueue_script(). The other is wp_enqueue_scripts(), with an s at the end. This mistake of mine broke my functions file. Just in case anyone makes the same silly mistake.
Would it be possible for you to paste the functions file here? This way we can just copy and paste the code into my own site. Can you please? Your tutorials are AWESOME!!!! Thanks a lot for putting all these videos together! Very much appreciated. Thanks!
Hey thanks for these videos, they're very helpful and interesting! Question: doesn't WP already come with a version of jQuery? If so, does it get loaded by default? Is there not a danger in loading jQuery the way you've done by possible loading it twice and having conflicts?
Wish it would load bootstrap and jquery when I do it.
I had to close the <?php ?> for the button style to work.
I think u used a , after get_template_directory_uri() instead of a . Else check if u made a typo in '/CSS/bootstrap.min.css'
Hi there! not sure if you are still responding, but I followed the entire instructions but I can't seem to make bootstrap css work when I load the site. :/ can I get any help please?
nice videos but not with play list very hard to find next video…:)
Dude great videos and easy to follow. I just want to encourage you to keep it up. You're on to something great that has a huge potential. I appreciate your time and effort a lot!
I think these videos should be put into playlists so a person can easily find the next tut. I think the way some of the videos are named makes it difficult to find what goes with what.
Is there another video from this one, Can't find it anywhere?
Great tutorial by the way !
Never mind ! i deleted whole database + updated phpmyadmin to latest + coded from begining index + style + functions and it worked 😀 ! thanks a lot
thank you for making it easy, but i'm stuck at the function.php apparently it fails loading bootstrap css and js with a ?ver3.5.1 in console.
It hooks the function we created to the wp_enqueue_scripts action. Search for "add_action" on the WordPress website for more info. It's very important for WordPress development. Thanks for watching!
why you use function
add_action at the last of your functions file
what this function do ???