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

Liam Maclachlan
Liam Maclachlan
22,805 Points

What is the best practice for making Static wordpress sites?

I create mini sites at work and was wondering how you guys deal with static sites on wordpress.

I create the basic site in HTML and then convert it, and all the pages to WordPress.

Currently I just create a custom template for each of the static pages (e.g. page-resources.php), create a new page in wordpress and give it the relevant name (Resources) ,and then select the custom template that is appropriate (/Template Name: resources Page/).

This means I can make the menu bars dynamic and change them easily if a new sttic page is added.

These will be made dynamic in time but for the moment, static content is fine (Phase 1 development = Get something online)

My question is: Is there a more effective way to do this or is it just a matter of preference, and how do you guys handle this kind of situation?

3 Answers

If by static, you mean that the site would not have a blog roll or site news page, then by the very nature of WordPress, you would absolutely need to use a template for each custom page layout. Any page can share template designs. As for your question, I am not sure I understand exactly what you are asking. You could have a repository of predesigned templates that you could drag and drop into each project folder. From there, you could update each template tag giving it the appropriate identifier to the appropriate page; if each page was customized as such.

Liam Maclachlan
Liam Maclachlan
22,805 Points

Yeah. That's what I expected to be the answer.

The site is being used to present the idea of the finished site and (even though it wouldn't take long) I didn't want to waste time making the content dynamic if the project took a different pathway but just questioned the best practice as I was doing it.

Thanks man. Any other thoughts on the subject? :)

I would develop static websites using bootstrap. WordPress is overkill in my opinion for any static website. If the client needs to be able to periodically update the wording on each page and the photos on the site, then they can hire a developer to do that or just use WordPress (which is great for this flexibility).

I develop all of my static websites in WordPress. I do this so that it is easy for the client to update the wording and such with ease. The other benefit is that their site receives regular security updates, and if the client wants some new functionality, it can be as simple as searching for plugins to meet the need. If necessary, going to GitHub and finding the source code for the plugin, then forking it and creating a custom version of the plugin to have a tailored fit to the client's needs can be a plus.

Honestly, the way Google seems to be working around with their search algorithm, using a platform like WordPress, especially with a premium framework like Genesis, would be a huge plus for SEO potential.

Liam Maclachlan
Liam Maclachlan
22,805 Points

I completely agree that it was overkill :) It was a very specific situation where this needed to be done. We had no access to the FTP to remove the install of the test site (don't ask) so I needed to convert it to a theme so it could be uploaded. 0_o

Took less than an hour to convert the interactive 2 page website, so it wasn't too bad :)

Ahh, Gotta love it. #FirstWorldProblems (-;

Liam Maclachlan
Liam Maclachlan
22,805 Points

Glad you know my pain =pp Thanks again for the confirmation, dude. Just curious if an alternative was available for this situation :)