theshadowfan Posted September 13, 2007 Share Posted September 13, 2007 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! Link to comment https://forums.phpfreaks.com/topic/69254-thumbnail-images-with-rollover-post-title/ Share on other sites More sharing options...
btherl Posted September 14, 2007 Share Posted September 14, 2007 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? Link to comment https://forums.phpfreaks.com/topic/69254-thumbnail-images-with-rollover-post-title/#findComment-348125 Share on other sites More sharing options...
theshadowfan Posted September 14, 2007 Author Share Posted September 14, 2007 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. Link to comment https://forums.phpfreaks.com/topic/69254-thumbnail-images-with-rollover-post-title/#findComment-348160 Share on other sites More sharing options...
btherl Posted September 14, 2007 Share Posted September 14, 2007 Ok. What's wrong with the code you're using now? Link to comment https://forums.phpfreaks.com/topic/69254-thumbnail-images-with-rollover-post-title/#findComment-348164 Share on other sites More sharing options...
tippy_102 Posted September 14, 2007 Share Posted September 14, 2007 Are you looking for a CSS tooltip? http://psacake.com/web/jl.asp Link to comment https://forums.phpfreaks.com/topic/69254-thumbnail-images-with-rollover-post-title/#findComment-348192 Share on other sites More sharing options...
theshadowfan Posted September 14, 2007 Author Share Posted September 14, 2007 The code right now outputs the thumbnails and post titles separately so I'd like to combine the two in one. Link to comment https://forums.phpfreaks.com/topic/69254-thumbnail-images-with-rollover-post-title/#findComment-348196 Share on other sites More sharing options...
redarrow Posted September 14, 2007 Share Posted September 14, 2007 use gd Link to comment https://forums.phpfreaks.com/topic/69254-thumbnail-images-with-rollover-post-title/#findComment-348206 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.