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:
![]()
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
- Access to your Blog directory structure from an FTP client such as Filezilla
- Text editing software such as Notepad
Setting up
- Login to your site
- Go to Presentation
- Click on Theme Editor
- **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.
- 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> - 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.
- 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
- So I uploaded Ajax and activated the plugin
- 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
![]()
- The first section calls the standard tag cloud feature in WP 2.3.1
- 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.
- The final section calls for the Ajax login widget
Variables
- 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!
- 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