How to Use the Gantry Framework for WordPress

tutuploadsWhat_you_will_learn.png

Frameworks offer a new level of control over website development. Gantry is one of several frameworks available that extend your ability to layout and modify websites and themes with no coding skills.

Gantry is based on a 960 grid system that can read about in our article on 960 grids. We also covered Gantry for Joomla in another tutorial.

Learning to use a framework like Gantry is well worth the effort if you plan on producing many sites rapidly.

In this hands-on tutorial, we’ll show you the absolute basics without any distracting details, and you’ll be up and running in about 15 minutes with a laid-out site.

What you will learn

We’ll show you how to install the grid system and a basic free template you can get from gantry-framework.org/download.

After installation we’ll demonstrate:

  1. Creating and placing the menu
  2. Adding and positioning the logo
  3. Adding sidebar widgets
  4. Choosing one of the standard pre-set styles

The purpose here is to introduce you to the framework concept through simple exercises that demonstrate core features. You will learn enough to help you decide if Gantry is the right choice.

When you’re finished with this tutorial, head over to gantry-framework.org which has advanced documentation on using Gantry.

Step 1. Download and installation

tutuploadsStep_1._Download_and_installation.png

You need two things for Gantry to be implemented on the site; the framework and the default theme. You will need to install each separately and that’s what we did in this tutorial. Both can be found via the Plugin and Theme installation areas in your WordPress administrator.

The alternative is to use the RocketLauncher from http://www.gantry-framework.org/download which is an entire package of WordPress, the framework and the default theme plus sample data already installed and configured.

tutuploadsmedia_1323118830084_500afe320dd6d7043ed6790ba6cf9a9c.png

In the admin area of your WordPress site, search for gantry in the plugins section, and then again in the themes section. Install and activate both.

tutuploadsmedia_1323119435825_7bf125688cb848c8cccaa4c0b19ccfbd.png

When you visit the site at this point, it will be blank.

So that you can actually see something on your site, go to Settings > Reading and set the home page to a static page.

Now let’s start giving the page some shape. Let’s add the menu.

Step 2. Adding the menu

tutuploadsStep_2_185ad5f8d9075dce4cc08c99a26a1941.png

Go to Appearance > Menus and create a custom menu.

tutuploadsmedia_1323119937324_06679fb3bf743ff7fb4954a507939e3a.png
  1. Go to Appearance > Widgets.
  2. Expand the Navigation position.
  3. Drag and drop Gantry Menu into the navigation.

Step 3. Activate and adjust the logo position

tutuploadsStep_3_126c702aa3ee5cf1582241fd33afbd0c.png

When you look at the list of positions on the right side of the menu, there is quite an extensive list. Each one of these corresponds to a row on the page. Each one is similar and they all act the same except for the content and sidebar positions. If you learn how to adjust the header position you will be able to apply the same techniques to all the other positions as well.

tutuploadsmedia_1323120179766_7dc4cb0419103d731e1217342f4ad8c5.png

Expand the Gantry menu widget to configure it. Choose the custom menu you created in the dropdown.

Gantry adds an animated drop-down menu to WordPress that is highly customizable. You could play with these and test out the effects, but to keep moving on in this tutorial, the default settings will be just fine. You also have a choice of a Fusion Menu or a Split Menu. If your the menu doesn’t appear in the template you’re using, try the other one.

If you haven’t created a custom menu, you might want to check show empty menu so the position is visible even if there is no menu.

tutuploadsmedia_1323121333918_dba0e63b2ca35b02eaebe8611bc0d027.png

Here’s what you’re site looks like with the menu enabled. Now let’s put some identity on the site with the logo.

tutuploadsmedia_1323121669632_af120cb8725218d67c86eeaf58754d47.png
  1. Go to Appearance > Widgets.
  2. Expand the Header section.
  3. Drag and drop Gantry Logo to the Header section.

Let’s add a text banner.

tutuploadsmedia_1323121869885_3ee49cfc059eb17feab95ff81525d260.png
  1. Find the Divider Widget and drag and drop it below the Gantry Logo Widget.
  2. Now find the custom Text Widget and drag it below the Divider Widget.
tutuploadsmedia_1323122068146_e201e673e8ab9cc0461d1195164a1b0a.png

Edit the Text Widget as you normally would and save it.

tutuploadsmedia_1323122222617_241f3950aa02ceb485877e0458cd68d8.png

Now we have a logo and some header text inserted and it’s starting to look like a website. But text is positioned too far from the logo. Let’s adjust the postilions.

Step 4. Adjusting the width of widget positions in a row

tutuploadsStep_4._Adjusting_the_width_of_widget_positions_in_a_row..png

There is a new entry on your dashboard for Gantry Theme. Click on it to get to the Gantry controls.

tutuploadsmedia_1323122441507_a72a98b423518b668b27885d0f52c7bf.png

Go to the Layouts tab. Look at the Header Position. You can see there are six positions available in each row, but only two are activated in the Header Postion of this template. You know this because the number 2 is highlighted and underlined.

You can see the relative space assigned to each position in the graphic underneath. The “a” is much larger than the “b”. When we put the widgets in, then added the divider between them, we put the logo in “a” and the text in “b”. We want to allocate more space to “b” and less to “a”. so the text starts out closer to the grpahic. There is a convenient slider for doing this quickly.

Click and drag the slider control and you can observe the changes in the relative widths of the two positions.

tutuploadsmedia_1323122803835_bed4a5be7c1fddefdb0d3229c56689ec.png

I’ve moved the slider to the left and you can see now that “a” is smaller than “b”. The popup shows you how many columns out of the total of 12 are taken up by each position. In this case “a” takes up 4 columns. Since we’re on a standard grid we can estimate the number of pixels taking 4 x 60(the column width).

Here’s what it looks like.

tutuploadsmedia_1323123118596_81005470498c92e5bd895d0d6582306b.png

The text has been moved over the left. There are 4 columns dedicated to the logo. Adjusting the slider I could move it a little farther if I wanted.

With the exception of a few specialized rows, all other content rows work like this. You can change the number of active columns in the template, change the allocation of space to each, or force the columns to hold their position even when they are empty. Those skills are easily learned.

Now let’s work on the sidebar.

Step 5. Adding widgets and adjusting the sidebar

tutuploadsStep_5_50b2e2086c5f6d186d4a3298f78bd300.png

Go back to Appearance > Widgets and drag and drop any widgets you want to display on to the Sidebar position.

Above is what the site looks like after you’ve added some widgets. I added Ajax Search and Gantry Categories, but you can add what you want. Put at least two on the sidebar for the next step, though.

tutuploadsmedia_1323124291634_b07c894c80a9e81afddfe192cdb4e186.png

Go back to the widgets page, and add a divider between the two widgets.

tutuploadsmedia_1323124321867_6864d0d9bcbf20be6b6c25255277c00f.png

Now you have two sidebars. Both on the right side. You can have up to 3 sidebars, but the columns start getting too narrow if you overdo it. But what if you wanted to have a three column layout with sidebars on either side? For that return to the Gantry Theme settings page and the layout tab.

tutuploadsmedia_1323124511871_5099880bf7725108eb077c133e794401.png

The MainBody Position is a little different than the other positions since you are limited to 3 sidebars and the main content area. But the slider acts similar to the ones in the other positions.

tutuploadsmedia_1323124523151_c275ad0ad3b66331dfa771cbc72b8196.png

You can see, when you compare this picture with the one above, adjusting the slider moved the sidebars to opposite sides of the main content. You can play with the slider and see the effects and positions available.

tutuploadsmedia_1323124829187.png

Sidebar A (“sa”) has been moved to the left while “sb” is on the right.

Step 6. Choosing the style

tutuploadsStep_6_7f12b0e51615e46d17885a5404d1642a.png

Go back to the Gantry settings and choose the Style tab.

At the top right you can see a button that says Presets. Click the button to toggle the presets view.

tutuploadsmedia_1323125567368.png

The generic Gantry template has three preset styles that are extremely easy to work with. They are fairly attractive in black and white. There are controls on the style tab that will let you adjust colors, and change fonts using Google Fonts for a wide variety of looks. When you change one of these presets, you can “Save Custom Preset as New” and start a library of custom layouts for yourself.

They will all be available here, and you can view them by dragging the slider then choosing the one you want to apply. You can leave the basic presets as they are and do all your work on derivative copies. When you switch between presets, none of the positions or widgets change, so you can instantly switch designs making it easy to choose which way to go with your styling.

Widget Positions

tutuploadsWidget_Positions.png

To make it a little easier to visualize, above is a diagram of the standard rows and widget positions.

Color and Typography

tutuploadsColor_and_Typography_434c6f3ac5f8946b1510566fb762254f.png

In addition to the preset layouts, there are 4 preset CSS styles, changeable background colors, thumbnail adjustments, font settings and an easy Custom CSS window.

By now you should be familiar with the core basics for working with Gantry.

  1. There are rows and inside each row there are positions.
  2. You can adjust the positions used and their relative sizes with dividers and sliders.
  3. You can change the style and create a new preset for experimentation.

Another feature that I didn’t go over, but it’s nice to know about, is that Gantry allows you to put shortcode in widgets. When you can put a widget just about anywhere on the screen, and you can put just about anything in a widget, you have unlimited possibilities for layout and content presentation.

This is just the starting point. If you find this a convenient way to work, visit gantry-framework.org and there are lots of videos and tutorials specifically on Gantry.

Author

0 0 votes
Article Rating
Subscribe
Notify of
10 Comments
Oldest
Newest
Inline Feedbacks
View all comments
AceSoft
AceSoft
12 years ago

Very good post, thanks for sharing OStraining!

ScottM
ScottM
12 years ago

Nice post – Quick question: How do custom post types work with it? I ask because I was playing around with the framework and can’t wrap my head around it – can you point me in the right direction?

Thanks

Waris
Waris
11 years ago

Very much clarified article. thank you very mcuh

JesusSoon
JesusSoon
11 years ago

Lovely tutorials

Harmony M.
Harmony M.
11 years ago

WONDERFUL. Finally I understand how to get content to display in places other than the post area. THANK YOU.

Rahul Jawalge
Rahul Jawalge
11 years ago

Its really a very useful Article.. Thanks for the help.

Ron Blackwelder
Ron Blackwelder
11 years ago

How can I change the size of the sidebar headers – or change which header tag is used for the sidebar header.

Mohammad
Mohammad
10 years ago

Hello,

please, can you tell us how we can turn of the css gzip/compiler or how they call it. We need to create our template and override is not an option…. need to change core files and the name of the template.

Thank you very much

Regards 🙂

kalyani
kalyani
6 years ago

Good tutorial, Thank you

alex-smirnov
6 years ago
Reply to  kalyani

You are most welcome!

10
0
Would love your thoughts, please comment.x
()
x