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 //* Don't copy the php | |
// Enqueue To Top script | |
add_action( 'wp_enqueue_scripts', 'to_top_script' ); | |
function to_top_script() { | |
wp_enqueue_script( 'to-top', get_stylesheet_directory_uri() . '/js/to-top.js', array( 'jquery' ), '1.0', true ); | |
} | |
// Add To Top button | |
add_action( 'genesis_before', 'genesis_to_top'); |
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 //* Don't copy the php | |
//* Activate the use of Dashicons | |
add_action( 'wp_enqueue_scripts', 'load_dashicons_front_end' ); | |
function load_dashicons_front_end() { | |
wp_enqueue_style( 'dashicons' ); | |
} | |
//* Add Extra div to nav for responsive menu |
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 //* Don't copy the php | |
//* Accessible Read More links for Genesis | |
add_filter('excerpt_more', 'jan_read_more_link'); | |
add_filter( 'the_content_more_link', 'jan_read_more_link' ); | |
function jan_read_more_link() { | |
$trimtitle = get_the_title(); | |
$shorttitle = wp_trim_words( $trimtitle, $num_words = 5, $more = '…' ); |
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 | |
//*shortcode handler for columnization | |
//* One Half | |
function shortcode_half_first( $atts, $content = null ) { | |
$content = wptexturize( $content ); | |
$content = wpautop( $content ); |
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
// Enqueue Scripts/Styles for our Lightbox | |
function child_theme_add_lightbox() { | |
wp_enqueue_script( 'fancybox', get_bloginfo( 'stylesheet_directory' ) . '/js/jquery.fancybox.pack.js', array( 'jquery' ), false, true ); | |
wp_enqueue_script( 'lightbox', get_bloginfo( 'stylesheet_directory' ) . '/js/lightbox.js', array( 'fancybox' ), false, true ); | |
wp_enqueue_style( 'lightbox-style', get_bloginfo( 'stylesheet_directory' ) . '/css/jquery.fancybox.css' ); | |
} | |
add_action( 'wp_enqueue_scripts', 'child_theme_add_lightbox' ); |
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
(function($) { | |
// Initialize the Lightbox and add rel="gallery" to all gallery images when the gallery is set up using [gallery link="file"] so that a Lightbox Gallery exists | |
$(".gallery a[href$='.jpg'], .gallery a[href$='.png'], .gallery a[href$='.jpeg'], .gallery a[href$='.gif']").attr('rel','gallery').fancybox(); | |
})(jQuery); |
NewerOlder