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
.subtitle { | |
display: block; | |
margin-top: 10px; | |
} | |
.breadcrumb .subtitle { | |
display: none; | |
} |
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
//* Display author box on single posts | |
add_filter( 'get_the_author_genesis_author_box_single', '__return_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
// Apply layout to static Pages that have children (subpages) | |
add_action( 'get_header', 'sk_force_layout' ); | |
function sk_force_layout() { | |
global $post; | |
// if we are on a static Page and if it does not have a parent | |
if ( is_singular( 'page' ) && !$post->post_parent ) { | |
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_content_sidebar' ); | |
} |
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_do_loop' ); | |
/** | |
* Outputs a custom loop | |
* | |
* @global mixed $paged current page number if paginated | |
* @return void | |
*/ | |
function sk_do_loop() { |
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_change_books_order' ); | |
/** | |
* Change display order of books on the archive from DESC to ASC | |
* | |
* @author Bill Erickson | |
* @link http://www.billerickson.net/customize-the-wordpress-query/ | |
* @param object $query data | |
* | |
*/ | |
function sk_change_books_order( $query ) { |
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 | |
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 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
// 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 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
// Customize entry meta in the entry header to show Favorite button for logged in users and Favorites count for non logged in users | |
add_filter( 'genesis_post_info', 'sk_post_info_filter' ); | |
function sk_post_info_filter( $post_info ) { | |
if ( is_user_logged_in() ) { | |
$post_info = '[post_date] by [post_author_posts_link] [post_comments] [post_edit] [favorite_button]'; | |
} else { | |
$post_info = '[post_date] by [post_author_posts_link] [post_comments] [post_edit] <span class="favorite-count">Favorited: [favorite_count] times</a>'; | |
} |
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
// Display values of custom fields at the top of Primary Sidebar on event CPT singular pages | |
add_action( 'genesis_before_sidebar_widget_area', 'sk_single_event_custom_fields' ); | |
function sk_single_event_custom_fields() { | |
// if we are not on a single event page, abort. | |
if ( !is_singular( 'event' ) ) { | |
return; | |
} | |
$event_cost = get_post_meta( get_the_ID(), 'event_cost', 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
// 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 ); | |
} |