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 trialEric Nevitt
4,914 PointsCompletely confused on how to upload a template
I have made a template in HTML and CSS and now I want to upload to WordPress. I watched the videos on how to put the template into WP, but I'm completely lost. I'm going to watch the PHP section today. I'm hoping it helps. I understand that I need to make my template into PHP. That's where I got lost.
Really wish there had been code to go along with the videos, it would have cleared things up.
22 Answers
Kevin Korte
28,149 PointsThis should also answer your question.
http://blog.teamtreehouse.com/responsive-wordpress-bootstrap-theme-tutorial
Eric Nevitt
4,914 PointsThanks Aaron. I will have to take a longer look at that. I looked briefly at it and it looked like it might help.
Eric Nevitt
4,914 PointsThanks Kevin! It does answer a lot of them.
Matt Campbell
9,767 PointsWordPress is written in PHP and all the WordPress hooks follow PHP so I recommend learning that and then WordPress makes a lot more sense. It's not just a case of putting an HTML and CSS doc in WordPress. It needs hybridising for WordPress.
Eric Nevitt
4,914 PointsThank y'all. I'm gathering that there's no way of learning WP without PHP. It's OK I like php better than any other programming language.
Matt Campbell
9,767 PointsNot really no. If you want to understand how WordPress works you need to know it the same you need to know HTML and CSS and javaScript. You can use WordPress without these things but only as a user rather then a developer. Hope that makes sense.
Eric Nevitt
4,914 PointsI can use my own template for this project right?
Zac Gordon
Treehouse Guest TeacherHey Eric Nevitt this is exactly what we designed our How to Build a WordPress Theme project to address! Hope that helps :)
Eric Nevitt
4,914 PointsAfter about the third video I was completely confused. I'm going to watch it again now and see if it makes more sense after I read the Bootstrap article.
Zac and the other staff here keep up the good work!
Zac Gordon
Treehouse Guest TeacherThe confusion might be because that project really takes a big picture look at the entire theme building process. The blog article may give a little more targeted help, but the bottom line is you'll have to build a theme with all the php and WordPress code a WP theme requires and then upload it to your wp-content > themes folder.
Hope that helps! Let us know if you hit any snags :)
Eric Nevitt
4,914 PointsThe last set of videos about setting up a template from a static site is where I got lost. It would be great to have some code to follow with the video. That way you can hear about the code and see what the code looks like. It seemed a bit rushed to me.
Zac Gordon
Treehouse Guest TeacherYeah, I hear you. With this project we did not have code challenges or code to download along the way but we likely will with the next project.
If enough folks ask for it though I may try to go back and add some of the code for download if I can.
Julie Kuehl
9,672 PointsADD THE CODE!!! Okay, I'll settle down. But yes, having the code available to peruse would be MIGHTY helpful. The videos are great, but they can go by quickly. Even replay/pause/rewind/repeat isn't the same as browsing through the entire code file.
Eric Nevitt
4,914 PointsThanks sir. When is the next project going to be open? Is there anything on HTML5 here? I know HTML 4 pretty well, but the world is wanting 5 now.
Eric Nevitt
4,914 PointsI'm not finding my HTML button in the admin panel. All I see is visual and text buttons.
Julie Kuehl
9,672 PointsThe text button is where you would put your HTML for a page.
Eric Nevitt
4,914 PointsOn my main menu there is no place to log in. How do I add that to my site?
Julie Kuehl
9,672 PointsFor a user/member to login? I'd be browsing wordpress.org/plugins to add that functionality.
Eric Nevitt
4,914 PointsShouldn't there be an "automatic" one that allows you to log in to the dash board?
Julie Kuehl
9,672 PointsThe admin login to get to the WordPress dashboard? To get there, just add /wp-admin/ to the end of your URL.
Eric Nevitt
4,914 PointsI understand that. I am just curious if there was a automatic log in on the menu bar or if you had to add that.
Julie Kuehl
9,672 PointsNo. That would be something you would add. Most WordPress sites don't advertise the way to login to the admin area. Most visitors to websites don't have access; those that do use the /wp-admin/ URL.
Eric Nevitt
4,914 PointsThat makes sense. No need to advertise to any one who wants to experiment with hacking into sites. The pros will know about add /wp-admin/
Eric Nevitt
4,914 PointsThe next question I have is about the functions.php. Where it says wpbootstrap_scripts_with_jquery() I use the the name of the theme I'm creating right?
<?php
function wpbootstrap_scripts_with_jquery() { // Register the script like this for a theme: wp_register_script( 'custom-script', get_template_directory_uri() . '/bootstrap/js/bootstrap.js', array( 'jquery' ) ); // For either a plugin or a theme, you can then enqueue the script: wp_enqueue_script( 'custom-script' ); } add_action( 'wp_enqueue_scripts', 'wpbootstrap_scripts_with_jquery' );
if ( function_exists('register_sidebar') ) register_sidebar(array( 'before_widget' => '', 'after_widget' => '', 'before_title' => '<h3>', 'after_title' => '</h3>', )); ?>
Zac Gordon
Treehouse Guest TeacherNo, that function would work if you didn't change anything, but its not a bad practice to "namespace" your functions with your theme or plugin name.
Eric Nevitt
4,914 PointsMy index page isn't working right. It's not showing the content that is on the home page.
Zac Gordon
Treehouse Guest TeacherDid you set the home page to be the front page under Settings > Reading ?
Eric Nevitt
4,914 Pointswp_register_script( 'custom-script', get_template_directory_uri() . '/bootstrap/js/bootstrap.js', array( 'jquery' ) )
What if I don't have any JS at the moment? Do I need JS? All I have in my WP file is jquery.
Is there a way that I can share my code as I have it now?
Zac Gordon
Treehouse Guest TeacherIf you aren't using any JS you don't have to include any :) if you don't have any JS you don't need to load jquery either.
Eric Nevitt
4,914 PointsYes I changed the settings to a static page for the front page and nothing happened. Everything works to the point of changing the index to just include the header and footer, after that every crashes.
Zac Gordon
Treehouse Guest TeacherYeah, I think you're right we're looking at some code files needed at this point :). You can always save them as text files and throw them up on Dropbox.
Eric Nevitt
4,914 PointsMy code is here https://teamtreehouse.com/forum/editing-the-home-page-on-the-how-to-build-a-responsive-wordpress-theme?sort=newest&topic=Wordpress. How can I access Dropbox?
Aaron Hill
3,983 PointsAaron Hill
3,983 PointsNot sure if this helps or not, but there is some PHP code instructions listed here: http://codex.wordpress.org/Theme_Development
I have never created my own theme for Wordpress before, I have always just taken an existing theme and modified it to suit my needs, so this may be of no use to you, but I hope it gets you closer to what you want to achieve!