How to insert widgets into the dynamic area in the Revolution Theme

The Revolution wordpress theme by Brian Gardner is the basis on which this website is built. A question has been raised as to how one goes about using multiple side bars or dynamic areas to display widgetised content:

Featured Page Areas


Dynamic Area

This is the process that I developed for this site (please note that this works for the self-hosted version of WP only) for utilising the dynamic area to display widget content. In this case I wanted to develop a user only access portal for clients. I used the Ajax widget which can be found here

There are few items you will need

  1. Access to your Blog directory structure from an FTP client such as Filezilla
  2. Text editing software such as Notepad

Setting up

  1. Login to your site
  2. Go to Presentation
  3. Click on Theme Editor
  4. **Important** open a page template you previously created based on the Featured Page (see this post for details) Do not use the standard Featured Page.
  5. Scroll to the bottom of your selected page, where you will see:
    <div id=”homepageright”>
    <h3>Recent Posts</h3>
    <ul>
    <?php get_archives(‘postbypost’, 10); ?>
    </ul></div>
  6. This means that the right-hand side of the page is using dynamic content which in this case is showing 10 recent posts. It is showing any posts I make in the news area one post after another.
  7. In my case I wanted to insert the Ajax widget into this section and make the posts relevant to the page that people were on – weddings in this case. I also for the purposes of this demonstration wanted to insert the Tag Cloud feature
  8. So I uploaded Ajax and activated the plugin
  9. I then replaced the code so that it looked like:<div id=”homepageright”><p>Tag Cloud</p>
    <?php wp_tag_cloud(); ?><p>Recent Weddings</p><ul>
    <?php $recent = new WP_Query(“cat=11&showposts=5″); while($recent->have_posts()) : $recent->the_post();?>
    <li><a href=”<?php the_permalink(); ?>”><?php the_title(); ?></a></li>
    <?php endwhile; ?></p>
    </ul><p>If you are a client, would you like to login and then select your name from the list above?</p>
    <?php get_ajaxlogin(); ?>

End Result

Featured Page after inserting scripts

  1. The first section calls the standard tag cloud feature in WP 2.3.1
  2. I then inserted script that would call any posts that had been listed under weddings category (cat=11) and to show only the last 5 (showposts=5) of them.
  3. The final section calls for the Ajax login widget

Variables

  1. To change what is displayed in the dynamic area you need to know the php code for the item you want to place – Google is a good place to start!
  2. This process applies to other pages in the theme that you can make templates of: news, single or featured

If you would like to learn how to add multiple side-bars and featured pages the take a look at this post

show hide 6 comments

February 12, 2008 - 2:24 pm

Guy - Hi Stephen

it looks as though Brian has added in some extra code since I purchased my theme – the categories bit is new to me! Anyway looking at the code, I would suggest removing all code from:

February 6, 2008 - 2:21 am

Stephen Anderson - Hi Guy,

I really like the way you have set up your Revolution theme. I was wondering if you could explain how you take the Categories section away from the top of the Nav bar and also how you get only one column to show up on the right hand side of your blog posts.

Thanks,
Steve

January 27, 2008 - 9:48 pm

Guy - Hi Jolly

please see this post

January 15, 2008 - 10:11 pm

Jolly - hey
what if in place of recent posts section on the home page, I want to put a recent comments section? Could you tell me a tutorial for this.
Thank you

December 1, 2007 - 2:15 pm

Guy - Hi David

thank you for posting the first comment on my new website! I am glad that you found the information useful and thank you for your kind words on my images. I am about to add a few more tutorials on:

Wordpress
- Widgets that I use and why
- Maintaining XHTML standards
- My thoughts on RSS

Photography
- Stage 2 in my scanning and workflow techniques
- Large Format kit bag: what I use and why
- Web publishing for photographers

Let me know if there is anything you would like to know
Best
Guy

December 1, 2007 - 6:13 am

David S - Hi there,
made my way here from the Revolution Forum as I use the theme on one of my sites. Winter is settling in here in the mountains of the western US and with the long nights ahead I hope to dedicate time to fine tuning my site(s) and am happy to see some useful help being shared. Thanks for writing them up.
Also a photography enthusiast (amateur), your images I have looked at so far are very beautiful. Congratulations.
Anyway, best wishes, keep putting up such nice content, there are interested folks out here in cyberspace.

Your email is never published or shared. Required fields are marked *

*

*

There was an error submitting your comment. Please try again.