WP CLI Delete All Terms in Taxonomy
wp term delete {taxonomy} $(wp term list {taxonomy} –fields=term_id)
wp term delete {taxonomy} $(wp term list {taxonomy} –fields=term_id)
WordPress styles the default audio and video elements, and frankly it’s not an improvement. Below is the code to turn the audio player from this into this Add the code to your theme functions.php file.
Improve the WordPress Audio and Video Player with 4 lines of code Read More »
xmlrpc.php is part of WordPress that is rarely used by any site, but poses a security risk. There has been a high level of attacks targeting this file so my advice it so secure your WordPress website by disabling this file completely. You can do so by adding this code to the bottom of your
Disable xmlrpc.php and Secure your WordPress Website Read More »
<?php // Get the points from the ACF field $points = get_sub_field(‘points’); // Add new line to each point $points = explode(“\n”, $points); // Now convert to HTML ?> <ul><?php foreach($points as $point) : ?> <li><?php echo $point ?></li><?php endforeach; ?> </ul>
CSS that get’s rid of the annoying outline for mouse users but preserves it for keyboard users, and is ignored by browsers that don’t support :focus-visible. :focus:not(:focus-visible) { outline: none } Source @LeaVerou
Hide the annoying outline for mouse users but preserves it for keyboard users Read More »
Sometimes even with the WP_DEBUG setting set to false you will see PHP error messages. This is normally because of the PHP setup configuration on the server. If you are seeing warnings that are causing issues with your theme add the code below to your wp-config.php file and all errors will be hidden. ini_set(‘display_errors’, ‘Off’);ini_set(‘error_reporting’,
You can add a custom style sheet to format the WordPress editor using add_editor_style. A frustrating problem with this technique is that browsers will typically cache this css file pretty hard, and so it’s tricky to see that changes you made appear in the editor. This is how you would typically add a custom style
The Visual Composer Single Image component defaults the Image Size to ‘thumbnail’. This really isn’t very useful, especially if your clients are using Visual Composer to build pages. An Image Size of ‘large’, ‘medium’, or even a custom image size, is much more useful. If you’ve set ‘large’ to be the same width as your main content
Change Default Image Size on Visual Composer Single Image Read More »
Sometimes we need to change the src of an <img> element, but we don’t have access to the HTML, like when styling a plugin. But, CSS is our friend here, and we can use the url pseudo element to set the <img> src. <style> .my-class { content:url(“http://imgur.com/SZ8Cm.jpg”); }</style><img class=”my-class”> Check out this JSFiddle. Should work in