Skip to content

Instantly share code, notes, and snippets.

View ricksportel's full-sized avatar

Rick Sportel ricksportel

View GitHub Profile
#logo {
background-image: url('sprite.png');
background-repeat: no-repeat;
background-attachment: fixed;
background-position: 50px 100px; /* Relative position of the background image */
}
<?php
//* Dequeue scripts
add_action( 'wp_enqueue_scripts', 'child_themename_dequeue_scripts' );
function child_themename_dequeue_scripts() {
//* Plugins scripts:
// Contact Form 7 scripts on pages without forms
if( !is_page( array( 'contact' ) ) ) {
<FilesMatch ".(js|css|html|htm|php|xml)$">
SetOutputFilter DEFLATE
</FilesMatch>
Header unset ETag
FileETag None
##Expire headers
<IfModule mod_expires.c>
# Enable expirations
ExpiresActive On
# Your document html
ExpiresByType text/html "access plus 12 hours"
# Default directive
ExpiresDefault "access plus 1 month"
<?php
//* Add the code snippet below to your WordPress child theme's functions.php
add_action( 'send_headers', 'child_themename_strict_transport_security_header' );
/**
* Enables the HTTP Strict Transport Security (HSTS) header.
*
* @since 1.0.0