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

Help With Custom Theming?

I'm very inexperienced with wordpress theming, but I have finished Zach's course on making a wordpress theme. I'm trying to build my theme using _s, but I think I'm a little confused on the hierarchy or something. I'm trying to figure out what I need to edit next to make everything look nice and neat, but I'm having a difficult time. So if you guys would kindly offer help and assistance, i would really appreciate it. =)

You can see the issues I'm having with the sidebar here: http://polycarp.us/blog/ and here: http://polycarp.us/how-far-is-too-far/ and here: http://polycarp.us/category/theology/

Many thanks =)

I am guessing your next step to starting to make everything look nice and neat would be HTML and CSS formatting correct? Or are you asking where in wordpress can you edit the HTML and CSS?

1 Answer

Really what I'm trying to say is that I've no experience with php and don't quite understand what I'm looking at when I'm trying to edit the html. I've been doing my best to make it how I want it but I change one thing and everything goes wrong and I have to spend another two hours trying to figure out how I messed up... It's been quite grueling... Is there any more information I could find about hierarchy? Or really anything that could help me finish this theme?

I've been messing around with this since yesterday and haven't made any headway. In fact, I've messed up so bad that Wordpress reverted back to the default 2013 theme... =/ I'll give the videos another watch when I get some free time in a bit, but I think I need some well written articles about hierarchy, theming, and editing wordpress themes... Gracias.

This would certainly be helpful to run through to begin understanding PHP a little better. The short answer on modifying the Wordpress PHP files is that you should start looking into the PHP language a bit more, so you can have a general understanding of what the code is doing that you are modifying. wordpress uses PHP to dynamically build the web page, so what you are looking at in the theme files is a mixture of PHP and HTML. Editing pieces of these files can cause the wordpress theme to break if you remove some piece of PHP that was being used to generate part of the page. For example, if there is a PHP foreach loop, and you modify/remove part of the loop that does something like remove a variable that is being used later on, the PHP will fail and you will be left with a blank page, with little to see for debugging. It would be helpful for you to understand how the PHP is generating the content, so when you modify the code, you know that you are properly editing the HTML generating PHP code.

Unfortunately I don't think there is a good answer to your question, other than that you should look into some PHP basics so you can start getting a better understanding of what the code you are editing is doing.

Thank you Riley. I'll be sure to run through that later tonight then. I've been putting it off to put more time into design. Lousy, I know =/ Thank you again.