WordPress Hack | Set Class for Home Page Link
The Problem:
Needed the home page button status to appear active, or in WP terms, as the “current_page_item”. So I need to determine if the page I was on was the home page or not, and if it was, I needed to add a class to it of “current_page_item”.
Solution:
Just a little PHP script does the trick- added into the LI element.
<ul>
<li <?php if (is_home())
echo ‘class=”current_page_item”‘;?>><a href=”<?php echo get_settings(’home’); ?>/”>Home</a></li>
<?php wp_list_pages(’sort_column=menu_order&depth=1&title_li=’);?>
</ul>
That’s it!
NOTE: Here is a useful plugin to check out and that I am using with the code above: Current-Page-Bugfix
Free Icons for Web Design and Development
Who doesn’t like freebies!
Here is a nicely designed collection of icons for web designers / developers.
The art of simple web design - a how-to guide
If you design websites, you will want to check this out.
It is an easy to read and apply how-to guide to building simple and effective websites, by renowned design and usability pro, Ben Hunt. He is the author of the webdesignfromscratch.com website.
This is an ebook that you can download instantly. Cost is $29.00.
Filed Under Cool Stuff
Stock Flash Products - Prices So Low it is Ridiculous!
Simply put, for the price, these are the best flash stock products on the net!
Want to add some sizzle to your site? Check out Flashden.net












