This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Do NOT include the opening PHP tag | |
// Customize the entry meta in the entry header | |
add_filter( 'genesis_post_info', 'bg_entry_meta_header' ); | |
function bg_entry_meta_header( $post_info ) { | |
// get author details | |
$entry_author = get_avatar( get_the_author_meta( 'user_email' ), 30 ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- breadcrumb --> | |
<div class="breadcrumb-wrap"> | |
<nav aria-label="breadcrumb"> | |
<?php get_breadcrumb(); ?> | |
</nav> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Do NOT include the opening PHP tag | |
/** | |
* Generate breadcrumbs | |
*/ | |
function get_breadcrumb() { | |
echo '<ol class="breadcrumb">'; | |
if (!is_home()) { | |
echo '<li class="breadcrumb-item">You are here</li>'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Do NOT include the opening PHP tag | |
// Load Script | |
add_action( 'wp_enqueue_scripts', 'selected_option_js' ); | |
function selected_option_js() { | |
wp_register_script( 'sm-modal-script', get_template_directory_uri() . '/js/modal.js', array( 'jquery' ), '1.0.0', true ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery( document ).ready(function(){ | |
// Add Modal HTML to body | |
jQuery('body').append( "<div id=\"myModal\" class=\"modal\"><span class=\"close\">×</span><img class=\"modal-content\" id=\"img01\"><div id=\"caption\"></div></div>"); | |
// Get the image and insert it inside the modal - use its "alt" text as a caption | |
jQuery(".img-frm img").on("click", function(){ // Change the class name ".img-frm img" with yours | |
var image = jQuery(this).attr("src"); | |
var captext = jQuery(this).attr("alt"); | |
jQuery(".modal").css("display","block"); | |
jQuery("#img01").attr("src", image); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Style the Image Used to Trigger the Modal */ | |
.img-frm img { /* Change the class name with yours */ | |
cursor: pointer; | |
transition: 0.3s; | |
} | |
.img-frm img:hover {opacity: 0.7;} /* Change the class name with yours */ | |
/* The Modal (background) */ | |
.modal { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Disable ETags | |
<IfModule mod_headers.c> | |
Header unset ETag | |
Header set Connection keep-alive | |
</IfModule> | |
FileETag None | |
############## MaxCDN Fix ############# | |
<IfModule mod_headers.c> | |
<FilesMatch "\.(ttf|ttc|otf|eot|woff|woff2|font.css|css|js)$"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Do NOT include the opening PHP tag | |
// Remove Query Strings | |
function _remove_script_version( $src ){ | |
$parts = explode( '?ver', $src ); | |
return $parts[0]; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# BEGIN Expire headers | |
<ifModule mod_expires.c> | |
ExpiresActive On | |
ExpiresDefault "access plus 5 seconds" | |
ExpiresByType image/x-icon "access plus 2592000 seconds" | |
ExpiresByType image/jpeg "access plus 2592000 seconds" | |
ExpiresByType image/png "access plus 2592000 seconds" | |
ExpiresByType image/gif "access plus 2592000 seconds" | |
ExpiresByType application/x-shockwave-flash "access plus 2592000 seconds" | |
ExpiresByType text/css "access plus 604800 seconds" |