Archive for the 'Plugins' Category
Create a sidebar menu using the Simple Section Navigation Plugin
One of the best feature of WordPress is its ability to be used as a powerful CMS. However, since WordPress is a blogging platform and not a true CMS, there are a few drawbacks, especially when building sites with deep navigation levels.
I was recently asked by a colleague to help develop a very large site for a Vancouver organization. The site wasn’t very complicated, but contained several dozens of pages four levels deep. The first levels were displayed as a top horizontal navigation bar, while the others appear in the sidebar depending on which page you are on.
Listing pages can easily by done by using the built in wp_list_pages() function, but this function lists all of the pages, regardless of where you are on the site. This function is ideal if you’re creating a sitemap, but not that useful for a side navigation.
As mentioned in an earlier post, the fold page list plugin can be used to generate a stylish side menu, but this still leaves us with no control as to what is displayed on what page.
For example, when one navigates to the About pages,it would be nice to view the pages which are children of about, while on the services, the children of services are displayed.
This can be achieved by using the simple section navigation plugin created by C Murray Consulting. Simply download and activate the plugin as you would any other and add this line of code to your sidebar:
<?php simple_section_nav("<h2>","</h2>") ?>
You can view this plugin in action by visiting the brochure I demo site.
Enhance your WordPress website using the Improved Include Page plugin
Ever wondered how you can provide someone with a sidebar text option without having to use widgets? Or maybe you’ve designed a slightly different home page and want to display more than one area of content? Vito Tardia’s Improved Include Page plugin is very useful for that and super easy to use.
Just like any other plugins, simply go to WordPress, download, install the plugin and activate it. Once activated you can use the following function in your templates:
<?php if(function_exists('iinclude_page')) iinclude_page(post_id); ?>
Creating a sidebar text option without using widgets
If you take a look at the Aquattro Living website, you will see that the contact information appears at the bottom of the left hand side column on all pages. This information is likely to remain unchanged for a long time, but instead of inserting it in the template file and make it unmanageable by the client, all you need to do is create a new page called Contact Us Sidebar, exclude it from the main navigation and insert the include function in your sidebar.php template file.
Display more than one area of content on a template
Both West Coast Sightseeing and Ascent websites have three boxes of content on their home page. These different area of content are easy to create using this plugin. Simply create three new pages, called for example home col1, home col2, home col3 and display the content using the following code:
<div id="col1"> <?php if(function_exists('iinclude_page')) iinclude_page(1); ?> </div><div id="col2"> <?php if(function_exists('iinclude_page')) iinclude_page(2); ?> </div><div id="col3"> <?php if(function_exists('iinclude_page')) iinclude_page(3); ?> </div>
You would of course change the post_id numbers to the number of your new pages and mark up the css to display the columns as you’ve stipulated in your design.
Optimize your blog with Revision Control
Post revisions we’re introduced with the release of WordPress 2.6. These are incredibly useful especially when you have a multi-author blog, but unfortunately this also increases the size of your MySQL database, which decreases the speed or your site.
If you have access to your database and know what you are doing, then an easy solution is to execute the following SQL statement:
DELETE FROM wp_posts WHERE post_type = "revision";
This simple SQL query will delete all of post revisions and, if you have a lot of posts, this may considerably reduce your database in speed up your blog.
An easier way to do it however, is by installing the revision control plugin. Once installed this plugin allows you to either disable or enable post revisions or what I like to do is to limit post revisions to the latest two.

This plugin is an ideal way to optimize and speed up your blog.
Protect you data with regular back-ups
Yes you’ve heard before, back-up, back-up, back-up. It can be hard and tedious to do database back-ups but it’s very important. Luckily for us, there’s a plugin for that. The WordPress database backup plugin makes it a cinch to carry out back-ups. Simply download the plugin, install and activate it as you would any other plugin. Once activated, you will find a new menu entitled Backup under the Tools menu. Navigating to this area will reveal a new admin window where you can make a back-up immediately or you can schedule it to be delivered to you via email or downloaded on your server or computer.

I’m not sure that back-ups could be any easier.
Secure your website with the Secure WordPress Plugin
For some reason that baffles me, there are loads of morons out there who have nothing to do but hack into websites. Because WordPress is Open Source, the source code is also available to them. The best way of course to protect yourself from attack is to update your WordPress to the latest version, but you can also make it a bit more difficult by hiding what version of WordPress you are using from everyone.
Depending on which template you start with, you may find the following line of code in your header.php file.
<meta name=”generator” content=”WordPress <?php bloginfo(’version’); ?>” />
If you do, take it out.
If you are running version WP 2.6 or higher, and you should be, you will notice that this line may not be there, but appears in your source code. This line of code is generated from the wp-head.
To remove the version from appearing in your source code, I like to install the secure WordPress plugin. The plugin not only removes the WordPress version it also remove error information on the login page and adds an index.html file in the plugin directory.
I never launch a website without this plugin and would encourage you to do the same.
Organise your WordPress pages with the My Page Order plugin
When using WordPress as a content management system, you may end up with numerous pages and sub-pages. WordPress provides you with the ability to order your pages by giving them a number, but the process is very clumsy and takes way too long if your site has numerous pages.
The self proclaimed computer geek at Geeky Weekly has created a plugin that lets you set the order of pages through a drag and drop interface. It’s very convenient and super easy to set up. Once you’ve downloaded it, installed it and activated it, you will see in your Pages sub navigation area a new link called My Page Order.
Navigating to this page brings you to a screen which looks like this:

My Page Order Interface
All you have to do is simply drag and drop the pages where you want them to appear and hit the button. It couldn’t be more simpler. I never install a website without this plugin. I love it and can guarantee that you will too. If you like it a lot, you can visit the Geeky Weekly website and make a donation.
Collapsable Navigation with the Fold Page List Plugin
WordPress easily allows you to list your pages on your side bar using the following:
<ul>
<?php wp_list_pages('sort_column=menu_order'); ?>
</ul>
Although this line of code is easy to use and understand, it’s drawback is that all of your pages (unless you specifically exclude them) will be listed. This may not be a problem if your site only has a few pages, but perhaps you would like to list a series of pages under a parent page only when that page is active. For example, list your services only when users select your services and your portfolio pieces only when the portfolio page is listed. This type of navigation is called expandable or collapsable and makes for uncluttered navigation.
A useful plugin to achieve this effect is the Fold Page List plugin.
The Fold Page List plugin, developed by WebSpaceWorks, provides you with more control on how WordPress displays the hierarchy of its page menu. All you need to do is download it, install it and activate it like you would any normal plugin and use the following line of code instead of the one above.
<ul>
<?php wswwpx_fold_page_list('sort_column=menu_order&depth=2&title_li'); ?>
</ul>
This second line of code, will display the same page listing as in the first, but we also specified that the page dept should not exceed 2. You can simply change that number to 3 or 4 if your navigation is deeper.
