Add This to .htaccess to speed things up

Enable Gzip and browser caching code.  Add to the bottom of the .htaccess

# LBROWSERCSTART Browser Caching
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/gif "access 1 year"
ExpiresByType image/jpg "access 1 year"
ExpiresByType image/jpeg "access 1 year"
ExpiresByType image/png "access 1 year"
ExpiresByType image/x-icon "access 1 year"
ExpiresByType text/css "access 1 month"
ExpiresByType text/javascript "access 1 month"
ExpiresByType text/html "access 1 month"
ExpiresByType application/javascript "access 1 month"
ExpiresByType application/x-javascript "access 1 month"
ExpiresByType application/xhtml-xml "access 1 month"
ExpiresByType application/pdf "access 1 month"
ExpiresByType application/x-shockwave-flash "access 1 month"
ExpiresDefault "access 1 month"
</IfModule>
# END Caching LBROWSERCEND


# START GZIP ENABLING #
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
</IfModule>
# END GZIP ENABLING #

Divi: Sub-Menu resize

Tired of hunting this down E-V-E-R-Y time I need it. 🙂

/*Sub menu adjustments */
#top-menu li ul { width: 280px; }
#top-menu li li a { width: 250px; font-size: 105%; }

Divi Custom Blurbs

This coolness: http://divisoup.com/custom-blurb-module/

+

This tweak to the CSS

/*———- [Custom Blurb Module] ———-*/
.OurWorkmanship img {
border: 5px solid ‪#‎FA1010‬;
border-radius: 50%;
margin-top: -170px;
}
.OurProducts img {
border: 5px solid #FA1010;
border-radius: 50%;
margin-top: -170px;
}
.OurServicePromise img {
border: 5px solid #FA1010;
border-radius: 50%;
margin-top: -170px;
}

.OurServicePromise {
webkit-border-radius: 30px;
moz-border-radius: 30px;
border-radius: 30px;
}

.OurProducts {
webkit-border-radius: 30px;
moz-border-radius: 30px;
border-radius: 30px;
}

.OurWorkmanship {
webkit-border-radius: 30px;
moz-border-radius: 30px;
border-radius: 30px;
}

Getting Divi, WooCommrece and Products Per Page Plugin to play nice

Whew, that’s a long title!

So I’m branching out into using the Divi theme a bit more.  It’s an OK theme, I probably haven’t explored all of it’s customizations enough, but it’s no Avada. 🙂  It’s nice though.

If you are using

Then here’s a tip.  It wont work…out of the box at least.  However after much searching I found a quick fix here.

Just add the code below to the functions.php file in your child theme (because you know to ALWAYS use a child theme, right?)

/* products per page with - this fixes it when using divi */
add_action( 'pre_get_posts', 'wppp_extra_filter', 30 );
function wppp_extra_filter( $query = false ) {
$query->set( 'posts_per_page', apply_filters( 'loop_shop_per_page', 12 ) );
}

And presto, it’s working!

Google Search Console Microdata

When running a site through Search Console, Google started crying and complaining that I didn’t have author or date micro data.  Boo frickin’ hoo! 😉

Anywho I search for a while, tried a few things and found this code that fixes it:

Add this to your functions.php in your CHILD theme (you better be using a child theme, mister!)

//code to make google search console happy about microdata
function add_atom_data($content) {
$t = get_the_modified_time('F jS, Y');
$author = get_the_author();
$title = get_the_title();
if (is_home() || is_singular() || is_archive() ) {
$content .= '<div class="hatom-extra" style="display:none;visibility:hidden;"><span class="entry-title">'.$title.'</span> was last modified: <span class="updated"> '.$t.'</span> by <span class="author vcard"><span class="fn">'.$author.'</span></span></div>';
}
return $content;
}
add_filter('the_content', 'add_atom_data');

It’s here: https://thomas.vanhoutte.be/miniblog/missing-updated-wordpress/