Developing WordPress Themes Using Responsive Frameworks

Responsive design is slowly but surely becoming an expected standard for web developers. This tutorial will show you how to add a responsive framework to your next WordPress theme.


What Is Responsive Design?

It used to be you only had to worry about website consistency across multiple browsers, but now we have to look at the bigger picture – consistency across multiple devices. The computer used to be our only gateway to the Internet, but now we jump online from our phones, TVs, tablets and who knows what else will come down the pipe. Having your website appropriately render and perform on any device should be a top priority this year.

Responsive design is all about making things fluid and adjusting according to screen size. Although WordPress doesn't always play nice with responsive design methods, there are ways it can be achieved. How responsive you decide to make your website is really about how much time you want to spend doing it.


Responsive Frameworks

There are several responsive frameworks out there to choose from. You might want to spend some time investigating each one to determine which has the included features your project might require. If you aren't sure where to start, here are a few to consider:

Bootstrap

Bootstrap from Twitter is built on a responsive 12 column grid. It has included fixed- and fluid-width layouts based on that system. It also comes with support for optional JavaScript plug-ins such as an image carousel, Typeahead, togglable tabs, and many more.

Less Framework

Less Framework is based on 4 layouts and 3 sets of typographic presets. Less Framework uses a default layout as a starting point and then uses CSS3 media queries to code 'child layouts'.

Foundation

Foundation is a grid system based on 12-columns that do not have a fixed width; they can vary based on the resolution of the screen or size of the window. Foundation comes pre-packaged with buttons and built in form styles, alerts, and more.

YAML

YAML is a multi-column layout based on a grid system with percentage widths. It comes with several built in features and supports several jQuery plugins such as Accessible Tabs and SyncHeight.

This list of frameworks is hardly complete, but for the sake of this tutorial, I'm going to show you how to incorporate Foundation into your next WordPress theme.


Step 1 Downloading and Applying the Framework

To get started, go download Foundation and add the files to your css and js folders in your theme's directory. The easiest way to add the required files to your theme would be to use wp_enqueue_script and wp_enqueue_style.

For this tutorial I'm going to show you what you place in your functions.php file to make Foundation work right off the bat, but for more details on adding files this way, check out the tutorial on how to include JavaScript and CSS in your theme.

To add the needed JavaScript for Foundation to work properly in your theme, you need to create a function that calls the wp_enqueue_script to serve them up.

Next, add the Foundation stylesheets to make the grid flexible. Paste this function after the one you just created.

Once saved, go back and check your source code to make sure your files were added correctly. It should look something like this:


Step 2 Add IE Only Conditions

Everyone loves to go that extra mile to make things work in Internet Explorer right? To make sure your Foundation framework stays responsive in Internet Explorer, you need to add a few conditional statements. These should go in your header.php file before the closing head tag.


Step 3 Working With the Framework

Now that your theme has Foundation setup, to make use of all its responsive features you need to design using the Foundation grid system. Like other responsive frameworks, it's a system made up of 12 columns. Other included features are pre-set button styles, tabs, tables and much more. Check out the Foundation documentation to view all bells and whistles and instructions on how to work with the grid.


Going With a Pre-Packaged Theme

There are plenty of free and premium WordPress themes available that make use of responsive design. If you would rather start with something out of the box, you can try out these themes:

WordPress Bootstrap, By 320Press

WordPress Bootstrap is a theme developed on Twitter's Bootstrap v.2.0.1. It's fully responsive with four different page templates to choose from, shortcodes, and multiple sidebar options. Once installed, you can check out bootswatch.com to download different color versions of the theme.

iTheme2

Based on the Themify framework, iTheme2 uses media queries to target different displays, comes with a customizable feature slider, a social media widget, two different theme skins and you can have up to four footer widgets.

Responsive Twenty Ten

The Responsive Twenty Ten theme supports flexible images, margins, and mobile images. It was created as a child theme for the included Twenty Ten theme.

Good Minimal (Premium)

Good Minimal is a clean, minimalist responsive layout that adapts to a multitude of displays and devices. Good Minimal comes with two different styles, supports unlimited custom sidebars, shortcodes, multiple drop down menus, and several other features.

Modulo (Premium)

Modulo is a responsive, fluid layout, supporting google fonts, shortcodes, multiple sliders, portfolio page templates and color customization. Modulo also comes with 5 custom widgets, including one for recent posts with thumbnail support.


Conclusion

Responsive design is continuing to grow in popularity and knowing how to utilize it within your future theme construction will be crucial for success. Whether you are adding a framework to your theme or using a pre-built theme supporting responsive design, your clients are going to expect multiple device support as a basic service.

Are themes you create responsive? Do you use a responsive framework we haven't mentioned? Tell us all about it in the comments below!

If you need help creating a responsive WordPress site design, try ordering one of the easy, cost-effective WordPress services on Envato Studio. These expert providers will take your design and convert it to a responsive WordPress site quickly and without hassle!

WordPress services on Envato Studio

Tags:

Comments

Related Articles