Monthly Archives: March 2006

Where can I find good deals on stuff?

I can’t remember where I heard this, but I once heard someone say "If your feeling blue, just go shopping and haggle" getting something for less than advertised, always makes us feel great. Is it really because we have to live on a budget, pinch every penny, is saving that extra $1 on fast food combo, or $5 on a memory stick, really going to make us millionaires in 50 years? The answer is no, my mom is from the "old country" never wasted a penny, and now 50 years later still not rich…

Price Network [dot] ca

So why do we love deals?  Honestly I can’t explain it, maybe it’s because we feel like we’re sticking it to the man, but what ever it is, it feels great. So the other day, I was surfing the web, and I stumbled upon a page with many links, and ended up finding myself on a site called www.pricenetwork.ca , that’s right .ca, so for our US friends, you get to save even more.

This site is a social bookmarking site, where users submit great deal on all kinds of good stuff "gudstoff", mostly tech related stuff "which is fine with me". There are great contributors, and is really up to date, there’s also a classified ad section, general pricing area, price drops and more, so before you make any purchases, check this site out, and you might find some awesome deals. 

Dynamic menu highlighting with WordPress

I’ve been searching for a way to highlight the current page that’s being viewed, WordPress does this automatically, it applies a class style named class=”page_item” for every WordPress Page and a class name class=”current_page_item” for the, yes you guessed it, the currently selected page.

So all you need to do is style those two classes to have a different look, and your viewers will be able to know what page they’re on. ex: “about, help, contact”, you can simply add these classes in your style.css, to see the effect:

.page_item {
background-color:#ccc;
color:#000;
}

.current_page_item {
background-color:#000;
color:#fff;
}

But why isn’t my “home” page highlighted? Unfortunately the home page is not a WordPress page , there fore it doesn’t do the page check and assign “current_page_item” style to the menu item. I couldn’t find this information or tutorial to make the home menu item highlight.

Through some searching and experimenting, I found a simple way to do it:

<?php if (is_home()): ?>
<li class="current_page_item"><a href="<?php echo get_settings('home');?>">Home Page</a></li>
<?php wp_list_pages('title_li='); ?>
<?php else : ?>
<li><a href="<?php echo get_settings('home'); ?>">Home Page</a></li>
<?php wp_list_pages('title_li='); ?>
<?php endif; ?>

The above code basically checks to see if the if the current page is the home page, if it is, it will assign the “current_page_item” style to the home menu item, if not, it obviously won’t.

of course there are other ways to do this, some themes like blix already have this feature setup, but for a non-programmer like me, it’s good to know the simple ways of doing it, so it can be applied to your current theme.

You can find alternative ways and more information of similar nature on the wordpress site.