Changing WP's Caption Setup
-
Hey Guys,
I’m working on a site for a church and they’ve asked for a staff page that allows a mouse-over effect on the images of their staff. I’ve come up with a fix that would keep them from having to edit html in order for it to work.
The plan is to find the code in the WP files that creates the div that contains the image and its caption, and move the caption ‘paragraph’ inside the link code that houses the image. That way I can use :hover to display it when a user mouses over it.
However I can’t seem to find the relevant code. The file ‘media.php’ has the build for the div itself – but references ‘do_shortcode($content);’ to build the link/image. I can’t seem to find where that variable is coming from, because its not instantiated in the media.php file.
I’m still relatively new to changing native wp files so if there is a better way of doing this (or a way of doing this without altering any WP files) I’d certainly appreciate any insight.
Thanks in advance!
—
https://severnruncom.ipower.com/closer-look/our-staff/
The caption right now is styled to cover the images. Eventually the display on them will be set to none and they will only display once a user mouses over a picture.
- The topic ‘Changing WP's Caption Setup’ is closed to new replies.