bd asked in StudioPress forums,
I need a small text (the image credits) to show up at the top of the mouse pointer when mouse hovering over the featured images of the Portfolio page. As I have no html control when adding the featured image in the Portfolio posts, I cannot add it this way.
In this article I am going to provide the steps to display featured images' captions (if present) as an overlay when hovering on images in Minimum Pro's portfolio CPT archive page.
Set image caption as title if present
In archive-portfolio.php, replace
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ( $image = genesis_get_image( 'format=url&size=portfolio' ) ) { | |
printf( '<div class="portfolio-image"><a href="%s" rel="bookmark"><img src="%s" alt="%s" /></a></div>', get_permalink(), $image, the_title_attribute( 'echo=0' ) ); | |
} |
with
To view the full content, please sign up for the membership.
Already a member? Log in below or here.
Sridhar,
You are a magician !
Respect and my warm thanks,
BD
[…] http://www.sridharkatakam.com/how-to-show-featured-images-captions-on-hover-in-minimum-pros-portfolio-pa… […]
How might this be tweaked to show the caption by default (without hovering)?
Thanks
This is working great on my main portfolio page but it is not working on the other portfolio pages I have set up with custom portfolio type posts. any ideas? i think the code need to be modified to work on my other pages but not sure how to do this. thanks so much. Love this site.