Last active
August 29, 2015 13:57
-
-
Save vermasachin/9803489 to your computer and use it in GitHub Desktop.
Fancybox for Genesis Framework
This file contains 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
//* Fancybox | |
/** Load custom stylesheet to header */ | |
add_action('wp_enqueue_scripts', 'load_fancybox_stylesheet'); | |
function load_fancybox_stylesheet() { | |
if ( !is_front_page() ) { | |
wp_enqueue_style('load_fancybox_css', CHILD_URL . '/fancybox/source/jquery.fancybox.css', array(), PARENT_THEME_VERSION); | |
}} | |
/** Load custom JavaScript * */ | |
add_action('init', 'fancybox', 10); | |
add_action('init', 'fancybox_loader', 99); | |
function fancybox() { | |
wp_enqueue_script('fancybox', CHILD_URL . '/fancybox/source/jquery.fancybox.pack.js', array('jquery'), '1', true); | |
} | |
function fancybox_loader() { | |
wp_enqueue_script('fancybox_loader', CHILD_URL . '/fancybox/loadfancybox.js', array('jquery'), '1', true); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment