Finally, an update to my Boilerplate: Starkers WP Theme!

Well, it took nearly 9 months, but the first real update to my Boilerplate: Starkers WP Theme is live!

The update includes all of the current HTML5 Boilerplate updates that are applicable to WordPress.

WordPress’ process still doesn’t allow me to use lowercase for the <!doctype html>, and still blocks me from including the optional Google Analytics code block, but most everything else is there and ready for you!

So, get to coding!

Cheers,
Atg

41 Responses to Finally, an update to my Boilerplate: Starkers WP Theme!

  1. aarontgrogg says:

    @Tom:

    Apologies, not sure what happened to the readme.txt file that was in the older version… I’ll be sure it is included in the next update, hopefully pushed to the repository within the next couple weeks.

    Essentially, I’ve upgraded to the latest HTML5 Boilerplate stuff, though this latest upgrade has in the “process” for some time, so is actually somewhat out-of-date already…

    Again, hope to have a new version pushed soon, and it WILL have the readme.txt back in it again…

    Thx,
    Atg

  2. Tom Hermans says:

    okay, I’ll browse through the code. Something breaks now, but probably because I made some minor changes (esp. to the functions.php – classnames etc) to the parent boilerplate …

    Am currently working on a few projects, but I’ll get in touch with you regarding child themes.

  3. Scott says:

    FYI,
    I have the latest version…in headser.php I had to change:
    boilerplate_filter_wp_title( ‘|’, true, ‘right’ );

    to

    wp_title( ‘|’, true, ‘right’ );

    in order for titles to work

  4. aarontgrogg says:

    @Scott:

    Yes, thanks and sorry, version 3, with that correction and other changes, is currently in the revision process with WordPress.

    That can be a lengthy process some times (last revision took nearly a month), but will hopefully push through soon.

    Appreciate the note,
    Atg

  5. gotofritz says:

    Hi Aaron, great work there, thanks.

    Just a minor, pedantic, addition: I have added the following lines in functions.php because acronym and strike are not valid HTML5 tags.

    (functions.php may be the wrong place, but it seemed to do the job, and quite frankly, I don’t care :-)

    unset( $allowedposttags['acronym'] );
    unset( $allowedtags['acronym'] );
    unset( $allowedposttags['strike'] );
    unset( $allowedtags['strike'] );

  6. aarontgrogg says:

    @gotofritz: So, your intent is to make WP no longer allow acronym and strike in the Post editor? If so, well okay…

    Not sure, but in either case, that’s not a move I would force on others. Developers/editors should know enough to not use now-defunct elements, but if they don’t, that’s their business, as far as I’m concerned… Perhaps a friendlier approach would be to convert those deprecated tags to their modern counterparts, messaging the editor post-save?

    If I missed interpreted your point, sorry.

  7. gotofritz says:

    Hi Aaron. That’s right, and comments too.

    Well I thought the whole point of the Boiler plate was to produce sites using good, valid HTML5. If you allow those tags then the Boilerplate will have created pages that won’t validate. Comments already don’t allow, say, font tags, so adding a couple more makes perfect sense to me.

    Developers / editors may not not be familiar with the difference between HTML5 and 4, so a bit of help may be needed.

    Changing acronym to abbr and strike to del (I assume those are the modern equivalents you are referring to) would indeed be more friendly, but much more involved. I suppose that would make sense for you, as you are distributing a theme for general use.

  8. aarontgrogg says:

    @gotofritz: You raise an good point, but when would the plug-in stop policing HTML elements? Seems like it would be a pretty long list…

    Anyhow, kudos on expanding, and I guess that’s the beauty of the open web: we all get to add/subtract where we see fit… :-)

    Cheers,
    Atg

  9. gotofritz says:

    (OK one last comment on this, it’s kind of minor, but for some valid code is essential)

    Well, the list is not very long – there is already a comprehensive list of tags in WP, in wp-includes/kes.php. So the issue is removing stuff from it rather than the other way around.

    I went through the list in full (earlier I had only checked tags allowed in comments) and there are only five tags altogether. For completeness sake, here they are, in my dirty quick ‘fix’ to disallow them
    unset( $allowedposttags['acronym'] );
    unset( $allowedposttags['strike'] );
    unset( $allowedposttags['big'] );
    unset( $allowedposttags['font'] );
    unset( $allowedposttags['tt'] );

    unset( $allowedtags['acronym'] );
    unset( $allowedtags['strike'] );

    If I ever get around doing it ‘properly’, i.e. mapping them to valid tags instead of removing them, I will post another comment.

    Thanks again for your great work.

  10. Dan says:

    Well I’ve taken the plunge and installed the boilerplate theme, but I have one query:
    In functions.php, the code to insert the primary menu seems to have two names for this menu – ‘Primary Menu’ and ‘boilerplate’. What purpose doesn the second boilerplate name serve?
    I only ask as I’d like to add a seconary menu to the header, but this second name has thrown me. I’m pretty new to this, so this is probably a dumb question.
    Here’s the code I’m referring to:

    'primary' => __( 'Primary Navigation', 'boilerplate' ),

    Other than that, I’m loving your theme by the way.

    Thanks,
    Dan

  11. aarontgrogg says:

    @Dan:

    Sorry for the delayed reply, something’s up with my comment notification, I’m not getting emails like I’m supposed to be…

    That line is a carry-over from the TwentyTen theme that Starkers was initially based on, and the word 'boilerplate' just references the theme name.

    Cheers,
    Atg

  12. @Eric:

    Not that well-versed with Roots, though the biggest difference appears to be their inclusion of a CSS Grid.

    Surely that’s right for some people, but my focus was as bare-bones as possible.

    Based on Starkers, there are things that I’ve even removed from that, and things I’ve added from beyond Starkers & BP, because they make sense to WP (like removing the WP version, etc.).

    Sorry I couldn’t be more helpful,
    Atg

  13. Many thanks for this great starter theme!!!

    One question with regards to javascript loading in the footer:

    quick version:
    How can I load ALL javascript into the footer, such as javascript from plugins?

    verbose version:
    For a site that I am building right now, I am creating a custom child theme of the boilerplate theme. The site relies heavily on a third party plugin. This plugin loads the latest jQuery as well as a bunch of other js into the header.

    Do I have to hack the plugin to get all of my javascript queued up nicely in the footer, or is there a more intelligent way of doing this?

    Thank you for your time, effort and talent.

  14. Adam says:

    Hey, with the next release of the theme, can you please allow us to override boilerplate_filter_wp_title? The current implementation conflicts with All In One SEO’s title handling.
    Other than that, super great theme / boilerplate! Thanks!!!!!

  15. aarontgrogg says:

    @Brent & @Adam:
    Sorry for the delayed reply, just finished moving, finally got my Internet set-up, and then found out my WP installation had been hacked… Anyhow, back in action!

    @Brent:
    You would likely have to hack the plug-in, which is problematic if/when the plug-in updates, because it will overwrite any changes you make. Though, take a closer look into the plug-in options, I regularly use NextGen Gallery, which also loads its JS into the <head> by default, but it has a global variable that I can set to tell it NOT to install things like jQuery.
    That said, the only JS that NEEDS to be in the <head> is Modernizr, because it affects CSS, and you don’t want your page jumping around after it has already loaded…

    @Adam:
    A good point, I hadn’t realized it was doing that… I’ll look into this for the next release. And I’d say it’s about time to start scraping through the latest HTML5BP docs…

    Thx!
    Atg

  16. Prax says:

    Aaron, I am a bit new to developing themes and I seem to be having trouble getting the side bar to show up, currently it is falling below my main content and not flowing to the side as it should be. Is there something I am missing or a piece of code I need to insert in one of the PHP files to get my sidebar working properly. Or is it that I need to add a div and give it a name such as “primary” and place that in one of the PHP files.

    Thanks,
    Prax

    • David Hucklesby says:

      Prax – You use CSS for this. Basically, float the main DIV left or right with a width. Give the sidebar a new block-formatting context by, say, using overflow. IE 7 and older need “layout” – the sidebar then takes up remaining space at the side of the main DIV.

      Example:
      #main {
      float: left;
      width: 62%;
      }
      /* only needed to give old IE "layout" */
      #sidebar {
      display: inline-block;
      }
      /* cancel inline-block but not "layout" */
      #sidebar {
      display: block;
      overflow: hidden;
      }

      HTH.
      Cordially, David

  17. David Hucklesby says:

    Q. In .htaccess you redirect paths beginning “css/” “js/” etc. to the appropriate theme directory. So why do you need to add the full URL to links in the header.php, derived from get_template_directory_uri(), instead of taking advantage of the redirect?

    I ask because get_template_directory_uri() is giving me the wrong path — WP is in a sub-directory.

    Cordially, David

    • aarontgrogg says:

      @David:

      Hmm… not sure if I completely follow, but a couple things:

      1. I don’t know nuts about .htaccess, what ships with this is a stripped-down version of what comes with HTML5 Boilerplate (as it ships, it breaks WP, so I basically started commenting lines until it worked…)
      2. Most WP functions seem to return absolute URLs, not much I can do about that… at least not here, maybe in another plug-in… :-)

      That help at all?

      Atg

  18. Jess says:

    Is there any chance this theme alters the Visual Editor?

    In my case, the visual doesn’t appear at all. I’m thinking that it has nothing to do w/this theme. But, still, I thought I’d check….

    Thanx

    • aarontgrogg says:

      @Jess:

      By Visual Editor, I assume you mean the Page/Post editor?

      It certainly shouldn’t, but if you find it is, please advise and I will correct!

      Maybe try disabling all your plug-ins, see if the issue persists?

      Atg

  19. Andrew says:

    Aaron, I just downloaded and installed the latest from the wordpress.org site and on activation get the following error message:

    Fatal error: Cannot redeclare create_boilerplate_admin_page() in /wp-content/themes/boilerplate/boilerplate-admin/admin-menu.php on line 17

    I haven’t fully looked into it yet, just letting you know.

  20. aarontgrogg says:

    @Andrew: Hmmm, by any chance are you using both my Boilerplate Theme and my Boilerplate plug-in? I could see where that might cause a conflict…. Let me know if that isn’t the problem, but in the mean time, I’ll work on a patch so the two can work together without conflict…

    Cheers,
    Atg

  21. hak says:

    I’m having a terrible time trying to get the boilerplate theme to work with ie7… downloaded it and of course… changed it to work well for the client, but i find that i have to remove the html 5 tags.. Does that mean that the wordpress theme is not loading modernizer? And if that is the case… how do i make this happen?
    Thanks
    hak

    • aarontgrogg says:

      @hak: Pretty easy to check if Modernizr is loaded, by either inspecting the html tag via Firebug for all the Modernizr classes, or check for the Modernizr object in a script panel, but even if Modernizr isn’t loading (is it “checked” in the BP Admin panel), IE-Shim should… Do you have a URL I could look at (feel free to email it directly to me if you want to keep it out of this conversation)?

      Atg

  22. kevin says:

    Hey Aaron, i just started to play around with the Boilerplate theme and i noticed something bothering me. I installed the theme on a brand new wp 3.3.1 installation and just selected in the admin the jQuery JS, jQuery Plug-ins JS and Site-specific JS options. I then looked at the source code and saw that the jQuery library is actually loaded after the plugins and site-specific files, which makes it impossible for the browser to perform any js code (did a test with a basic $(‘html’).css(‘background’,’#ccc’); on domready). Any clue on how to just change the order in which files are loaded to load jquery.js first?

    Thanks in advance.

    • aarontgrogg says:

      Yes, sadly, this is a new issue with 3.3.1, it appears something in this version changes the order in which the files are added…

      This, among several other patches, are in the works, and hopefully I’lll have updated soon.

      Sorry for the hassle, and thanks for the notification,
      Atg

  23. aarontgrogg says:

    Please note that there was a change in WP 3.3+ that breaks the order this Theme loads JS files, including putting jQuery after the site-specific JS files, which of course doesn’t work so well…

    I’m working on a fix and will push to the WP Repository as soon as possible, sorry for the snag.

    In the mean time, I highly recommend to simply not upgrade to WP 3.3+ until this Theme supports it.

    Cheers,
    Atg

  24. Mark says:

    I’m using the HTML5 boilerplate theme with WP 3.3.1

    I tried to install the HTML5 boilerplate plugin and it gave an error message about redeclaring functions so I renamed theme\boilerplate and it installed OK.

    But the plugin and theme do not work if both are installed:


    Fatal error: Cannot redeclare create_boilerplate_admin_page() (previously declared in C:\wamp\www\site\wp-content\plugins\html5-boilerplate\admin-menu.php:32) in C:\wamp\www\site\wp-content\themes\boilerplate\boilerplate-admin\admin-menu.php on line 20

    If I uninstall the plugin how do I access wp-content\themes\boilerplate\boilerplate-admin\admin-menu.php ?

    http:\\localhost\site\boilerplate-admin\admin-menu.php

    gives a 404 error.

    Thanks :-)

    • aarontgrogg says:

      @Mark: Yeah, didn’t initially occur to me that people might want to use both, since they do almost the same thing, but there are a couple things that the plug-in does that the theme doesn’t (can’t, if you ask WordPress).

      I’ve rewritten the theme code to check if functions exist before declaring them, but have to wait for the review process to complete before I can update it again…

      Cheers,
      Atg

  25. james says:

    Media queries didn’t work in ie8 and below until I updated respond.js.

    Thanks for the theme.

    Btw, I take it you’ve stopped updating it?

    Thanks

    • aarontgrogg says:

      @james: Ugh, no, I have not totally stopped, just stalled… Life has gotten in the way, but I am re-inspired by the 4.0 H5BP, so who knows, hopefully one day soon I will make the time to update this and the plug-in…

      Cheers, and thanks for the spur,
      Atg

Leave a Reply

Your email address will not be published. Required fields are marked *