drewsymo/Foundation — Issue #7: More Complete WordPress Theme Needed
Author: timnicholson
Created: 2011-11-18 17:39:03+00:00
State: open

Hi, Drew. Great work on putting this all together. From your notes, it sounds like you had to do quite a bit of work getting each of the Zurb Foundation pieces (orbit, etc.) working.

I've been playing around with your WordPress theme "framework". I totally get that its for developers and doesn't come with anything other than working Zurb Foundation code. However, I think it would be great to include an actually working theme that follows the typical WordPress theme conventions.

So I have created that. I made it a child theme so that your base theme can easily be updated. However, I've had to duplicate your entire header and footer code in the child theme in order to be able to display actual header and footer content. At the very least, I would like to request that you add just a couple of lines of code to your base theme to avoid this.

1. In the header, right after the

tag, can you make a simple call to include a WordPress template for the actual header content. Like this:

That will load a file in the theme called template-header.php. I believe that it won't even error out if that file doesn't exist.

2. Also in the header, I noticed that you didn't enqueue the standard WordPress comment reply script. That should always be done for theme compatibility. So right before the call to wp_head(), could you please insert this:

3. In the footer, can you also include a WordPress template for the actual footer content. It should go right before the call to wp_footer():

If the file exists, it will include template-footer.php.

Lastly, I'd like to see if you are open to including my child theme code right in your base WordPress theme. I have enabled features that I believe every theme developer will want and its certainly easy enough for a developer to tweak. Here's what the child theme supports:

* Custom WordPress header image. I can easily add support for a custom background as well, just haven't done that yet.

* Custom menu support. I have a desktop/tablet header menu and footer menu. I also have a separate smartphone header and footer menu.

* A sidebar widget area (on the right). If its empty, it calls the search, pages, and categories widgets.

* A footer widget area. The footer widget area is really cool in that you set one config var for the number of footer columns you want (1 through 4) and it automatically creates that many footer widget areas and sets the right column width according to the 12 column grid. I actually have even cooler code commented out that uses a single footer widget area and is smart enough to determine how many widgets are dropped into it (up to 4) and it automatically lays out the columns correctly on the grid. However, I thought it might be more intuitive for developers or users to see multiple footer widget areas each with just one widget in it, since that is how most WordPress themes work.

* A home page with the Orbit slider and a widget area. I made it full width with the idea being that you'd add a text widget and use the grid to lay out your home page however you want. No sidebar is displayed. The footer is displayed, though.

* Supports content pages, of course

* Supports comments. I didn't need to write anything at all for that. I simply call the built-in WordPress comment routine and it has a very simple default layout that it pulls from WordPress core.

The child theme doesn't use a bunch of custom styles. It uses the Foundation "pagination" class for the menus, "panel" class for the sidebar widgets, the whole footer is wrapped in a "panel" class. I just included a few "nice to haves" that hide the WordPress admin bar and stats smiley and mapped a couple of WordPress default css classes over to the Foundation equivalents. For example, to indicate the current selected page with the blue underline in the menus.

So this is still very much barebones, but its a completely usable, minimal WordPress theme out of the box. And of course since its based on the Zurb Foundation, its responsive to smartphones and tablets.