No IE6, You Can’t Play!

   Posted: September 1st, 2010    By: Devin Walker   

More and more sites are blocking access from IE6 users, and I couldn’t back them anymore. Not only is IE6 a bad choice for security reasons, if you have done any web design work you also know what a pain it is to comply to. Simply state, it breaks our cool tools! Check out this hilarious poster by the guys over at robotjohnny.com for momentile.com.

IE6 can't play in the treehouse with all the other browsers
Read the rest of this article »

How to Use a Facebook Like Button on Any Page

   Posted: July 9th, 2010    By: Devin Walker   

The facebook like button is in. I know, you’ve been seeing it more and more around the web and now you want to implement it on your own website. I’ll show you how to do just this using a little snippet of code that will allow you to add a dynamic Facebook “like” button to any page on your website!

Implement a dynamic Facebook Like button

Read the rest of this article »

How to Setup XAMPP WordPress Virtual Hosts

   Posted: July 6th, 2010    By: Devin Walker   

I like to develop in a localized environment where I have to do minimal setup and configuration on the remote server when it’s time to go live. Working with WordPress makes it very easy to do this and it’s a breeze to setup with virtual hosts and the free XAMPP stack.

Why do this? It makes it very easy to move over the WordPress database when it’s time to go live. Developing locally is always in your best interest. This method is preferred over ‘going commando’ because you can keep better control over your code and it’s faster to develop. Plus a whole slew of other reasons that you can Google if you feel like it. Let’s get started on setting up your WordPress install to use XAMPP’s virtual hosting capabilities.

Read the rest of this article »

Use JavaScript to Print an Image

   Posted: July 1st, 2010    By: Devin Walker   

Using JavaScript you can have images print when clicked on. What this script will do for you is open whatever image is specified in the JavaScript in a new browser window along with the Print options window.

This method is useful if you are looking for a way to have either a print button for a specific image on a page. Please refer to the demo to see exactly how this can be accomplished. Remember to specify the image’s width and height in the JavaScript onClick event.

Read the rest of this article »

WordPress Heirarchical Sidebar Page Menus

   Posted: June 14th, 2010    By: Devin Walker   
Let's say you want to show a hierarchical sidebar menu that displays a listing of current subpages. This is easy enough, but let's say that you have a top menu that shows all top-level pages. Once you click on a top level page from that menu it will take you there and in the sidebar show all subsequent child pages. Now what if those child pages have a child? You don't want all menu items to disappear when you click on one of those child pages. That just looks funny. Here's the bit of code that works great for me:
<?php 
if ((count($post->ancestors) > 0) 
        && ($data = array_reverse($post->ancestors)) 
        && !is_null($data[0])){ 
	$data = wp_list_pages('title_li=&echo=0&child_of='.$data[0]); 
} else { 
        $data = wp_list_pages('title_li=&echo=0&child_of='.$post->ID); 	
} 
if (strlen($data) != '') {?>
          <ul class='nav'><?php echo  $data; ?></ul>	
<?php } ?>

Leave a comment!

Posted in PHP,Wordpress

Tagged with