Hide Slide Filename/Alternate Text Display onMouseOver
URL to the page in question:
-
Hi
How does one hide the filename/alternate text for a slide from displaying onMouseOver?
Thanks
I found a thread in the WordPress support forum about that. I have not tested the solution, but it appears that this would work to remove the title from any featured images. Here’s how to go about that:
- Go to the appearance section in your WordPress control panel and select edit to open up the theme editor.
- From the list of files on your right, choose functions.php and scroll down to the bottom.
- Just before the last
?>
, paste this:
add_filter('post_thumbnail_html', 'thumbnail_filter', 99, 5);
function thumbail_filter($html, $post_id, $post_thumbnail_id, $size, $attr) {
// you can alter the resulted HTML here
$html = // remove title from $html
return $html;
}
- Save your changes.
If all goes as expected that will remove the title. You can leave the alt text blank when uploading the files.
Let me know if you have any questions or trouble,
Bill
- The topic ‘Hide Slide Filename/Alternate Text Display onMouseOver’ is closed to new replies.