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 entry »

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 entry »

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: [inline]
<?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 } ?>
[/inline]

No comments :[

Posted in PHP,Wordpress

Tagged with

WordPress Alternating Classes

   Posted: June 5th, 2010    By: Devin Walker   

It's often very useful to have alternating classes in for styling purposes. Let's say you want every other row to be a darker shading, this is very common and I'll show you how to implement this in WordPress using a simple bit of code.

For my example here I will show you how to create alternating classes for use with the WordPress loop. This way, when the loop pulls your posts from the db every post container will have a separate class name up to as many as we define in our array. This method of alternating classes in WordPress will work for wherever you have a loop. Therefore, your comments, categories, tags, etc. can all be styled up using this method. Pretty cool huh? Let's see how this is done.

Read the rest of this entry »

No comments :[

Posted in Wordpress

Tagged with ,

Modern Web Font Options for Web Designers

   Posted: June 1st, 2010    By: Devin Walker   

Google's new Font API, Cufon, @font-face, sIFR, FLIR...?! It's 2010 and the Internet has long since evolved to become an integral part of modern society. As web designers, our web fonts used to be limited to a small number of 'safe' font-families. Today there are a number of options that allow web developers to break free from the confines of the limited 'web-safe' font spectrum and express themselves, and their websites, more individually with unique fonts. Let's examine how the web's top font solutions work and how they are implemented.

Read the rest of this entry »