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
remove_action( 'genesis_before_loop', 'genesis_do_taxonomy_title_description', 15 ); | |
add_action( 'genesis_after_header', 'genesis_do_taxonomy_title_description' ); |
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
// Enqueue site-wide scripts | |
add_action( 'wp_enqueue_scripts', 'sk_enqueue_scripts' ); | |
function sk_enqueue_scripts() { | |
wp_enqueue_script( 'global', get_stylesheet_directory_uri() . '/js/global.js', array( 'jquery' ), '', true ); | |
} |
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
// Load Flexbox Grid | |
add_action( 'wp_enqueue_scripts', 'sk_enqueue_flexbox_grid' ); | |
function sk_enqueue_flexbox_grid() { | |
wp_enqueue_style( 'flexboxgrid', CHILD_URL . '/css/flexboxgrid.min.css' ); | |
} |
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
// Enqueue Scripts | |
add_action( 'wp_enqueue_scripts', 'sk_enqueue_scripts' ); | |
function sk_enqueue_scripts() { | |
wp_enqueue_script( 'detect', get_stylesheet_directory_uri() . '/js/detect.min.js', '', '1.0.0', true ); | |
wp_enqueue_script( 'general', get_stylesheet_directory_uri() . '/js/general.js', '', '1.0.0', true ); | |
} |
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
<?php | |
add_action( 'genesis_loop', 'sk_do_loop' ); | |
/** | |
* Outputs a custom loop | |
* | |
* @global mixed $paged current page number if paginated | |
* @return void | |
*/ | |
function sk_do_loop() { |
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
// Add custom opening div for post title | |
add_action( 'genesis_entry_header', 'sk_do_post_title_before', 7 ); | |
function sk_do_post_title_before() { | |
echo '<div class="my-entry-title">'; | |
} | |
// Add custom closing div for post title | |
add_action( 'genesis_entry_header', 'sk_do_post_title_after' ); | |
function sk_do_post_title_after() { | |
echo '</div>'; |
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
//* Add support for custom header | |
add_theme_support( 'custom-header', array( | |
'flex-height' => true, | |
'width' => 360, | |
'height' => 76, | |
'header-selector' => '.site-title a', | |
'header-text' => false, | |
) ); |
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
// Register a custom image size for hero images on single Posts | |
add_image_size( 'post-image', 1600, 400, true ); | |
add_action( 'genesis_after_header', 'sk_hero_image' ); | |
function sk_hero_image() { | |
// if we are not on a single Post, abort. | |
if ( !is_singular( 'post' ) ) { | |
return; | |
} |
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
<?php | |
add_action( 'genesis_loop', 'sk_custom_loop' ); | |
function sk_custom_loop() { | |
$themes = array( | |
'Agency Pro' => 'agency-pro', | |
'Agentpress Pro' => 'agentpress-pro', | |
'Altitude Pro' => 'altitude-pro', | |
'Ambiance Pro' => 'ambiance-pro', |
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
/** | |
* AJAX Load More | |
* @link http://www.billerickson.net/infinite-scroll-in-wordpress | |
*/ | |
function be_ajax_load_more() { | |
check_ajax_referer( 'be-load-more-nonce', 'nonce' ); | |
$args = isset( $_POST['query'] ) ? array_map( 'esc_attr', $_POST['query'] ) : array(); | |
$args['post_type'] = isset( $args['post_type'] ) ? esc_attr( $args['post_type'] ) : 'post'; |