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 trialGary Hurd
17,533 Pointshow to link to a second style sheet in Wordpress
Hi, Can anyone help me figure out how to link to a second stylesheet in wordpress? I have tried to link to it in the functions.php; a link on the page, but I cannot get anything to work. Any ideas?
4 Answers
Gary Hurd
17,533 PointsHI Guys, I have figured out how to do this with only one style sheet, which for this particular site would be most appropriate. I I thank you all, and maybe we can have the discussion for future issues, so if anyone wants to discuss this, lets do. thanks
Tyler van der Hoeven
11,863 PointsMind showing what you're trying that's not working? It really shouldn't be hard at all if you've got all the locations right.
Gary Hurd
17,533 Pointsfunction blog_style_sheet() { if (is_page('007') ) { wp_enqueue_style( 'blog-styling', get_stylesheet_directory_uri() . '/css/style2.css' ); }} add_action('wp_enqueue_scripts', 'blog_style_sheet');
this is the function that i was entering in my functions.php
Gary Hurd
17,533 PointsI would not think its that hard, I just can't seem to be able to figure it out. Or i have been looking and thinking so much that I am just going in circles now.