Jump to content

Thumbnail images with rollover Post Title


theshadowfan

Recommended Posts

I'm trying to have alter a featured posts plugin on Wordpress. I'd like to have the thumbnail appear with the title appear when the user rolls over the image.

 

Here's the code that needs to be modified:

 

function get_featureimage($post_id) {

global $wpdb, $post_meta_cache;

$result = $wpdb->get_results("SELECT meta_value FROM $wpdb->postmeta WHERE post_id = '$post_id' AND meta_key = 'featurepic' ");

 

return '<a href="'.get_permalink($post_id).'"><img

title=".get_featuretitle($post_id)"

class="featureimage" src="'.get_option("siteurl").'/'.$result[0]->meta_value.'" alt="Feature"/></a>';

}

 

 

Any help would be appreciated!

Try setting the "alt" attribute as well as title.  You might also want to check out overlib for more sophisticated rollover popups.

 

Hmm, do you want an image appearing in the rollover popup?  Or just text?

 

I just want text, being the title of the post, to appear in the rollover popup.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.