HOWTO: The quick way to use Twitter Bootstrap with Genesis

I love the Genesis Framework by Studiopress. And I love the Twitter Bootstrap Framework for creating “standard” web interfaces. There is so much that both the Genesis and Bootstrap frameworks get right when it comes to ease of use and consistency. Because I love them so much, I decided to start using them together to get great looking front-end layouts that Studiopress doesn’t provide out-of-box. I like having solid looking tables, buttons, and forms, so Bootstrap is a great way to get that easily and quickly.

Here’s the quick and dirty way to use Genesis and Bootstap together.

1. Download a custom package of Bootstrap

One of the main reasons that I use the Bootstrap framework on WordPress sites with Genesis is to get some of the sleek looking front-end look to buttons, tables, forms, etc. I don’t normally use the entire Bootstrap framework with Genesis, usually just tables and buttons, but if you want the entire thing you can do that too.

Go grab a custom package of Bootstrap here. First click the Toggle All button on the Choose Components heading. Then simply choose the following from the list:

  • Tables
  • Forms
  • Buttons
  • Icons

This will get us a good start. Next, click the Toggle All button on the Select jQuery Plugins. We don’t need any of these for this exercise. Scroll to the bottom and click Customize and Download. Next, unzip the file you just downloaded.

2. Move the Bootstrap files to your WordPress installation

I’m not going to go in depth on how to access your WordPress installation via FTP (you can find that elsewhere). Drill down to your Studiopress theme folder. In my case here at DevBurner, I use the eleven40 theme so I would go to:

/wp-content/themes/eleven40

Next, upload the entire bootstrap folder you just unzipped to the root of your theme directory.

3. Include the Bootstrap CSS file in your site’s header

I like to do this with the Genesis Simple Hooks plugin (if you don’t have it, install it from here or simply search for it in your WordPress installation via the Plugins > Add New). Once the plugin is activated, in your WordPress backend go to Genesis > Simple Hooks. In the hook for wp_head fill it in with this:

<link rel="stylesheet" type="text/css" href="/wp-content/themes/eleven40/bootstrap/css/bootstrap.min.css" />
<script src="/wp-content/themes/eleven40/bootstrap/js/bootstrap.min.js"></script>

Remember to replace the name of your theme folder with the one that you are using.

4. Now you are done, so test it out

Because of the little bit you did above you get some great stuff.

Nice looking tables by using the table CSS class for your tables.

<table class="table">
  <tr>
    <th>Title</th>
    <th>Description</th>
  </tr>
  <tr>
    <td>This is the title</td>
    <td>This is the description</td>
  </tr>
</table>

This markup creates this:

Title Description
This is the title This is the description

If you want to add a nice striped layout to your tables, just add the tabled-striped class to your table:

<table class="table table-striped">
  ...
</table>

You’ll get this:

Title Description
Great looking tables Are awesome
Great looking front-ends Are exciting for people to use
Great looking sites Are something people come back to again and again

You also get some great looking buttons by simply using the btn class on anchor links:

<a href="http://google.com" class="btn" >Go to Google</a>

The above yields:

Go to Google

You can also add some classes like btn btn-primary, btn btn-success, or btn btn-danger will give you:

Go to DevBurner

Go to Apple

Go to Microsoft

There is so much more you can do now with the power of the Genesis and Bootstrap frameworks combined. I highly suggest for you to check out the Bootstrap framework documentation if you want to utilize some of the great front-end enhancements it can bring to your website.

Anonymous MSFT developer admits Linux is faster than Windows →

Well, if you've used Linux for any length of time and compared its speed to that of Windows, this was a no brainer. What's damaging is that this Microsoft OS developer brings to light just why Linux is faster. Not only does it show that Microsoft is … [Continue reading]

Get Your Subtle Patterns at subtlepatterns.com →

If you are looking for some amazing subtle backgrounds for your sites, apps, documents, even desktops, then I have to highly recommend checking out subtlepatterns.com. I'm thinking about applying some of them to DevBurner and have been playing … [Continue reading]

A Toolset for a Productive New Year (2013 Edition)

Another year is here and it’s time to get serious about the tools I use to get my job and life done. I try every few months to “downsize” what I use; but I am coming closer to the realization that I don’t have to be “minimal” to be … [Continue reading]

2013: A New Year

I, like a lot of people I read and respect, don’t necessarily like the idea of a New Year’s Resolution. Mostly because they are broken and forgotten before the end of January. And when that happens, we tend to feel like failures. That’s not … [Continue reading]

Integrating Netbot with Launch Center Pro

When App.net was announced and Alpha was released, I was a tad apprehensive of getting involved. After Mr. Vardy talked me into it, I chocked up the $100, bought a developer account, and began to use the service. I have fell in and out of using … [Continue reading]

Making Time to Explore

It’s easy getting stuck in the rat-race of getting things done every day. We have an agenda set for ourselves, have our to-do lists guide us, or have to answer to someone or some entity that demands we do certain things (that would be our jobs). … [Continue reading]

BaBSE 9: Know Your Tools

Being a good software developer means that you can create software solutions that help solve problems quickly. Being a software developer doesn't mean that you know every little nook a cranny of a language or every design pattern on earth (although, … [Continue reading]

On Writing Today

I almost didn't post today, but instead of that, I thought I'd redirect you to something I wrote that is near and dear to my heart (and that I spent a decent amount of time on) over at Lifehack. OmniFocus vs. Things 2.0 In a nutshell If you … [Continue reading]

BaBSE 7: Perfect Planning Doesn’t Exist

I've been "working" on a web app for sometime now and will use it as my "calling card" moving forward. It's just something small and effective that I need to create to ship something into the world, to break the ice, and to create a platform to build … [Continue reading]