Justin Young Profile Picture 2020 - PulseNest™
I hope you like what you see. If you need business management help from our team, get in touch.

Remove Image Title on Hover for WordPress Websites

This is how you remove image titles on hover for your WordPress website. 

Just put this code into the function.php file and wallaah, you got it!! Now go forth and create.

/* Remove Image Title on Hover - Start */
add_filter( 'the_content', 'remove_images_title_attribute' );

function remove_images_title_attribute( $text ) {

	// Get all title attribute tags
	$result = array();
	preg_match_all( '|title="[^"]*"|U', $text, $result );

	// Replace all title tags with an empty string
	foreach ( $result[0] as $image_tag ) {
		$text = str_replace( $image_tag, '', $text );
	}

	return $text;
}
/* Remove Image Title on Hover - End*/

Sincerely,
Sir, Doogie Howser.

Was this post helpful?

Want to Offer Better Service?

Hi, Im Justin Young, the Founder of PulseNest. For years I struggled trying to balance sales, and customers while trying to provide the best service possible.

Justin Young Profile Picture 2020 - PulseNest™

About Justin Young

He is the founder of Spear Group. A coalition of marketing, SAAS, and business management systems. He has been recognized by businesses and associates for his business savvy and vision over the course of his career. Also he has some pretty sweet dance moves.

Want to Offer Better Service?

Hi, Im Justin Young, the Founder of PulseNest. For years I struggled trying to balance sales, and customers while trying to provide the best service possible.

Learn How PulseNest™ CRM Automation Can Help your Business