Leveraging AI to Supercharge Your WordPress Business Website
In today’s competitive digital landscape, every business website needs an edge to...
17.Dec.2017 | Code Snippets, Wordpress
Fed up of getting the W3 Validator warning “The type attribute is unnecessary…”?
Here is a handy bit of code to remove the type attributes (and anything else) from WordPress. Add this to your functions.php file and customise. Then you’re good to go!
add_action( 'template_redirect', function(){
ob_start( function( $buffer ){
$buffer = str_replace( array( '', "" ), '', $buffer );
// Also works with other attributes...
$buffer = str_replace( array( '', "" ), '', $buffer );
$buffer = str_replace( array( '', "" ), '', $buffer );
$buffer = str_replace( array( '', "" ), '', $buffer );
return $buffer;
});
});
Coding Tips, Wordpress, Wordpress Function, WordPress Tips
Share
In today’s competitive digital landscape, every business website needs an edge to...
WordPress has come a long way since its humble beginnings in 2003....
In the ever-evolving landscape of website development, staying ahead of the curve...
A quick way to manually disable the WordPress emojicons code without needing a plugin. Pop this in your functions.php file:...
A useful bit of code to prevent files from being accessed (or hotlinked) in WordPress. Prevent files from being directly...
WordPress has come a long way since its humble beginnings in 2003. The platform, once a simple blogging tool, now...