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
// Remove the secondary navigation menu on front page | |
add_action( 'genesis_header', 'sk_conditional_secondary_nav' ); | |
function sk_conditional_secondary_nav() { | |
// if we are not on front page, abort. | |
if ( !is_front_page() ) { | |
return; | |
} | |
remove_action( 'genesis_after_header', 'genesis_do_subnav' ); |
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
/** | |
* AJAX Load More | |
* @link http://www.billerickson.net/infinite-scroll-in-wordpress | |
*/ | |
function be_ajax_load_more() { | |
$args = isset( $_POST['query'] ) ? array_map( 'esc_attr', $_POST['query'] ) : array(); | |
$args['post_type'] = isset( $args['post_type'] ) ? esc_attr( $args['post_type'] ) : 'post'; | |
$args['paged'] = esc_attr( $_POST['page'] ); | |
$args['post_status'] = 'publish'; |
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 | |
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 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
// 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 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
// Updates slug to match title for Soliloquy sliders | |
function sk_force_update_slug( $data, $postarr ) { | |
if ( 'soliloquy' === $postarr['post_type'] && ! in_array( $data['post_status'], array( 'draft', 'pending', 'auto-draft' ) ) ) { | |
$data['post_name'] = sanitize_title( $data['post_title'] ); | |
} | |
return $data; | |
} |
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
//* 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 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
// 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 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
add_action( 'pre_get_posts', 'sk_query_offset', 1 ); | |
function sk_query_offset( &$query ) { | |
// Before anything else, make sure this is the right query... | |
if ( ! ( $query->is_home() || is_main_query() ) ) { | |
return; | |
} | |
// First, define your desired offset... | |
$offset = -1; |
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
remove_action( 'genesis_before_loop', 'genesis_do_author_box_archive', 15 ); | |
add_action( 'genesis_before_loop', 'sk_do_author_box_archive', 15 ); | |
/** | |
* Add author box to the top of author archive. | |
* | |
* If the headline and description are set to display the author box appears underneath them. | |
* | |
* @since 1.4.0 | |
* | |
* @uses genesis_author_box() Echo the author box and its contents. |
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
// Remove default header opening markup function | |
remove_action( 'genesis_header', 'genesis_header_markup_open', 5 ); | |
// Add back header opening markup function w/o the structural wrap | |
add_action( 'genesis_header', 'sk_header_markup_open', 5 ); | |
function sk_header_markup_open() { | |
genesis_markup( array( | |
'html5' => '<header %s>', | |
'xhtml' => '<div id="header">', |