Unleashing E-commerce Success: The Power of Freelance Web Development Specialising in WooCommerce in Bristol
In the ever-evolving world of e-commerce, having a robust and flexible platform...
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 the ever-evolving world of e-commerce, having a robust and flexible platform...
In the thriving city of Bristol, businesses are constantly seeking innovative ways...
In today's digital age, having a strong online presence is crucial for...
Add this to your functions.php to add a class to all pages within a tree: function is_tree($pid) { // $pid...
Add this code to your functions.php file to add the dimensions to the image object array for svgs. add_filter( 'wp_get_attachment_image_src',...
Simple bit of jQuery to add an active class to the current navigation item based on the page url. jQuery("nav...