Creating Widget Areas Using the Atahualpa Theme

I was looking through Atahualpa’s theme options and noticed the new version of the theme lets users create widgetized areas.  Under Widgets & Sidebars, there is now an option called “Add new Widget Areas.”

A widget area is a widget-ready space in your theme.  You can drag some of the standard widgets which come with your theme there, or the widgets that come with your installed plugins.  Most themes have limited widget areas: typically in the sidebar and footer areas.  (You can of course make child themes and manually add widgetized areas wherever you want, but that requires some programming, as well as access to theme files not available on the Commons.)

The Atahualpa theme is unique for its level for customization, and the “Add New Widget Areas” option provides even more opportunities to control  the look and feel of your site.  You can add widget areas to the header, the footer and the center column.

Though the documentation may seem overwhelming, I found the whole process quite easy.  There are a bunch of ways to configure the location of your widgetized area, but I simply used the defaults.  One tricky part was to remember to reload the pages a couple times to actually get the whole thing the work – this is stated in red in the instructions.

My Use Case

I wanted to use the Rotating Post Gallery Widget plugin on the Commons Codex to announce help topics.  This is the widget that is used to generate the slides on the front page of the Commons.  It was built for the Commons, and is available and free to the WordPress community.

Task 1 – create a widget area in the center column, above the page title.

I took the following line of code from the documentation (Minimum required Parameters):

<?php bfa_widget_area('name=My new widget area'); ?>

and modified it (very) slightly to read:

<?php bfa_widget_area('name=Center Column Widget'); ?>

But I realized I only wanted to have the widget area appear on one single page, so I added a conditional “if” statement.

<?php if ( is_page( 67 ) ) {bfa_widget_area('name=Center Column Widget');} ?>

Each page and post is assigned an ID number.  If the page ID is 67 – (the landing page for the Codex) create a widget area – otherwise don’t.  (Page and post ID numbers can be found in the URL when editing them in the dashboard.)

Task 2 – find the place to put this chunk of code

click to enlarge

In the Center Column section of the theme’s controls, I clicked on “Style and Edit Center column”.  In “The Loop” section, I pasted my code right before the post’s “headline.”   See code on the right:

Task 3 – Verify that it worked

I refreshed a couple pages and went back into the dashboard, clicked on Widgets – and there was my new Widget area – “Center Column Widget” – ready to be populated with one or more widgets.

Task 4 – Install and activate Rotating Post Gallery Widget plug-in

Standard stuff…

Task 5 – Create some gallery posts

When the Rotating Post Gallery Widget plugin is installed, a new tab is added to your dashboard which lets you add Gallery Posts.  These are the slides that will appear in the widget.

To add a gallery post – simply give it a name, then go to add Media Files from your computer, find an image, and click save.  Do not “Insert into Post”.

You have now “attached” the image to the gallery post.  Fill in the body with the caption you want to appear at the bottom of the slide.  Optionally, you may provide the order of appearance.

Add at least two gallery posts to get the images to rotate.

Task 6 – drag Rotating Post Gallery Widget into “Center Column Widget” area

Click on the widget to configure the width and length of your image.  For best results, try to re-size your images to the appropriate size (see task 5).

Final Result

Click on this link to see the final result.  Hope this helps all you Atahualpa users.

Other Atahualpa Links:

Help with other parts of the Atahualpa theme may be found at the following links:

, ,

Comments are closed.

Creative Commons License

Need help with the Commons? Visit our
help page
Send us a message
Skip to toolbar