Page Sensitive Multi-Level Navigation
While most sites don’t need incredibly deep page navigation there are situations that justify a hierarchy beyond the typical 2 – 3 levels. Unfortunately that can be cumbersome for top navigation drop-downs (more than 1 level of drop down is too much IMHO) so another solution needs to be found. I ran into just such a situation for a client and while I”m also not a fan of left hand navigation it was the decision of the client to utilize it in conjunction with their top navigation, and in retrospect it made sense for them. To keep things easily navigable we also implemented breadcrumbs (which is a good practice anyway).
The mission was to display sub-pages of the current page you are on in the left nav and once you hit the bottom of the hierarchy to show pages which are parallel to that page within the same branch of the hierarchy.
After some digging and experimentation I came up with the following which executes perfectly in only a few lines of code.
<?php
$children = wp_list_pages("title_li=&child_of=".$post->ID."&echo=0&depth=1");
if ($children == "")
$children = wp_list_pages("title_li=&child_of=".$post->post_parent."&echo=0&depth=1");
?>
<ul>
<?php echo $children; ?>
</ul>
<?php endif; ?>
Of course you style to taste…
That’s it! Used in conjunction with a standard WordPress top-navigation and breadcrumbs you can easily display page sensitive multi-level navigation for your super-complex multi-level site!
How To: Adding Private Pages to Your Blog’s Navigation
If you aren’t subscribed to WPEngineer.com, you really should be! This blog is quickly becoming one of my favorite blogs about WordPress (outside of this one of course!). In a recent post, Michael has provided a quick and easy to implement WordPress Hack that will allow you to add pages to your WordPress navigation that are private (so only designated people such as administrators can see them).
When I first read this post I immediately felt that this would make for a great way to add your Adminstrator login to your WordPress navigation, so only people that need it could actually see it.
Click here to get the code you need to accomplish this hack.
WordPress News & Notes – October 23, 2008
Here are some WordPress-related news and notes I’ve run across over the past week and felt were worth sharing with everyone:
- Price Reduction at Theme Hybrid – The theme club by Justin Tadlock, Theme Hybrid, is currently offering a $10.00 membership to his theme club for the first 100 members. You can read more about the club here.
- How to Integrate Pagination into your WordPress Theme – Jean-Baptiste Jung has explained how to build PageNavi plugin functionality directly into your WordPress theme.
- 15 Premium Quality Free WordPress Themes – Noupe is at it again, this time with a collection of free WordPress themes that they consider to be premium quality. I think they did a pretty good job narrowing this down to 15 quality themes.
- How to Add PollDaddy Polls on Your WordPress Blog – Leland of Theme Lab has written a detailed write up explaining how to add PollDaddy polls to your WordPress blog.
- Building a Control Panel for Your WordPress Theme – Custom Theme Design has published a great post about building a control panel into your WordPress theme. The example even includes code snippets.
- How to Exclude Categories from your RSS Feed – Have a few categories on your blog that you don’t want your feed readers to see? Web Kreation has written a great post explaining how to prevent certain categories from showing up in your feed.
10 Ways to Improve Navigation in WordPress
This guest post was written by John Pratt who blogs about blogging, WordPress, and his life as a webmaster. If you have webmaster or WordPress knowledge and are interested in writing a post for Hack WordPress, please contact us.
Improving the navigation in your blog means visitors will find MORE of your content, and return MORE often. Even with the best content and lots of traffic – the most important thing is that people can QUICKLY find what they were looking for from the first moment they enter your blog!
I’m going to give you 10 different ways you can improve the navigation in your blog that anyone can (and should) implement for better usability when you have a WordPress powered blog. You will be surprised how much easier it will be to find content by using these techniques.
10 Steps to Improved Wordpress Navigation
- Add Breadcrumbs: This is a very easy fix, and one I don’t see on many blogs. Breadcrumbs are the simple link trail on the top of a web page like this: “Home -> Page -> SubPage”. It’s easy to add breadcrumbs, just use a 2.6+ compatible plugin like “Breadcrumb NavXT.
- Get rid of Ugly Next and Previous Links: Every Wordpress homepage, and any page that has lists of blog posts (search, archive), has simple “next” and “previous” links to navigate older posts. I have witnessed (countless times) visitors thinking that all the posts you had to offer were listed on the homepage and that was it (mainly people not familiar with Wordpress). You should have a linked list of pages (like google) that says “this is page 1 of…” and links to “2, 3, 4, 5, etc”. It’s easy to fix this with plugins like WP-PageNavi or WP-Page Numbers.
- Bold Pagination on Single Pages: You can’t use the last trick on single pages, but every single (post) page has links at the bottom to view the next and previous page as well. I edit my “single.php” file to change that text to something like “Post before this one” and “Post after this one”, and align them left and right (bolded). You can style them any way you want – the point is to make them stand out. Visitors often come from SERP’s to a single post page, make it easy for them to view other ones as well.
- More Links and Excerpts: This is personal preference really, but I prefer to have post excerpts on pages instead of the entire post, because I feel it clutters up pages and makes everything run together (on most blogs). I like to encourage people to visit the single post page to read the entire thing. There are a couple ways to change a running post page (like search results, archives, index.php) to show excerpts. On your homepage, you can use the Homepage excerpts plugin to achieve this. On all other pages, just the “the loop” and change the_content to the_excerpt.
- Multi-Paged Navigation: If you ramble on like I do, some of your posts can be dreadfully long. Break them up into multi-pages posts using a plugin like Multi-Page Toolkit. It’s not only better usability, but it creates multiple post pages so you can get more indexed in the search engines.
- Related Posts: What better way to get people to stay on your blog than by recommending to them “related posts” that you’ve written?! All it takes is a plugin like Related Posts.
- Most Viewed Posts: Like an MVP of the game – you should be showing your visitors your most valuable content! Lester Chan has a great plugin called WP Post Views that has a sidebar widget than can display your most viewed posts! This is a great way to showcase your best posts and keep people on your blog.
- Most Popular Posts: Alex King has a plugin called Popularity Contest that displays how popular posts are.
- Category Images: Having your categories a post is assigned to listed and linked is a great way to get visitors to view everything else you have posted in that category, but sometimes (like “ad blindness) readers are blinded to post meta info. Solve that by assigning images to your categories, so that they stand out prominently! All you need is the Category Icons plugin.
- Sidebar Navigation: There are a bazillion options for pimping out your sidebar, and most bloggers seem to just liste categories, archives, and a blogroll. Check out all of the Wordpress Widgets available, the Wordpress Codex page for “Customizing Your Sidebar”, the List Authors widget, Parent Pages widget, and especially the Wordpress plugin iFrameWidgets. The iframe widgets one is great if you use myBlogLog, BlogCatalog, Entrecard, or other third party widgets that may slow the load time of your blog.
By following these 10 steps to better navigation, your visitors will STAY LONGER and READ MORE each and every time they visit your blog. This article was a synopsis of my in depth article Wordpress Hack #5: 10 Ways to Improve Navigation. Happy Hacking!

















