Windows scaling issues for high-DPI devices: Adobe Photoshop & Illustrator
If you have recently bought a 4k monitor, you may have noticed...
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
If you have recently bought a 4k monitor, you may have noticed...
A quick snipped of code that can be used attach a function...
In the early days (2003), WordPress was essentially a blogging tool and...
Simple bit of jQuery to add an active class to the current navigation item based on the page url. jQuery("nav...
Add this to your functions.php to add a class to all pages within a tree: function is_tree($pid) { // $pid...
A nice solution for a custom WordPress Ajax login form without using a plugin. Place this anywhere you would like...