Posts

Showing posts from October, 2010

show and hide text in texbox

jQuery(document).ready(function(){ jQuery('#search').focus(function(){ if(this.value=='Search fonts to Download...') { this.value='' } }); jQuery('#search').blur(function(){ if(this.value=='') { this.value='Search fonts to Download...' } }); });

Breadcrumbs in wordpress

global $post; // if outside the loop if (is_page() && $post->post_parent) { $parent_title = get_the_title($post->post_parent); echo ' » ' . $parent_title . ' » '; wp_title(''); } else if (is_page()) { echo ' » '; wp_title(''); } else { }

Display title of parent & sub page

global $post; if($post->post_parent) { $parent_title = get_the_title($post->post_parent); echo $parent_title; } else { wp_title(''); }