View Single Post
Old 05-05-2013, 06:03 AM  
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 55,350
Quote:
Originally Posted by mromro View Post
Thanks Guys.....I got it working pretty much what I wanted. Just gotta mess with the thumb size. Thanks!
if you want to replace your permalink title with the hover kind you can simply modify your permalink in your template code to something like this.

Code:
function get_hover_permalink($postid) {
	$thumbnail = wp_get_attachment_url(get_post_thumbnail_id($postid));
	if($thumbnail) 	$content = '<a href="'. get_permalink($postid).'" title="'. get_the_title($postid) . '" class="thumbnail" rel="'. $thumbnail .'">'.get_the_title($postid).'</a>';
	else $content = '<a href="'. get_permalink($postid).'" title="Permalink to '. get_the_title($postid) . '" rel="bookmark">'.get_the_title($postid).'</a>';
	return $content;
}
it will only do the hover if a featured image exists.



like so.
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


WP Stuff
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote