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 Font Awesome | |
add_action( 'wp_enqueue_scripts', 'enqueue_font_awesome' ); | |
function enqueue_font_awesome() { | |
wp_enqueue_style( 'font-awesome', '//maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.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
// Display Hero Image on Single Posts | |
// Credit: https://sridharkatakam.com/overlay-entry-title-featured-image-single-posts/ | |
add_action( 'genesis_after_header', 'topleague_hero_image' ); | |
function topleague_hero_image() { | |
if ( !is_singular( 'post' ) ) { // if we are not on a single Post, abort. | |
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
.site-inner { | |
clear: both; | |
padding-top: 0; | |
word-wrap: break-word; | |
background-color: #fff; | |
clear: both; | |
margin-bottom: 100px; | |
margin-top: 100px; | |
max-width: 1200px; | |
position: relative; |
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
//* Display Excerpt as Post Subtitle in Genesis | |
add_action( 'genesis_entry_header', 'wpsites_excerpt', 10 ); | |
function wpsites_excerpt() { | |
if ( is_singular( 'post' ) && has_excerpt() ) { | |
/*if ( is_singular( 'post' && 'page' ) && has_excerpt() ) {*/ | |
printf( '<p class="excerpts">%s</p>', get_the_excerpt() ); | |
} | |
} |
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
//* Display Page Title and Page Excerpt (as Subtitle) after Header | |
add_action( 'genesis_header', 'topleague_remove_page_title'); | |
function topleague_remove_page_title () { | |
if ( is_singular( 'page' ) && !is_front_page() ) { // apply to all pages except the front page | |
remove_action( 'genesis_entry_header', 'genesis_do_post_title' ); | |
add_action( 'genesis_after_header', 'topleague_after_header_content' ); | |
function topleague_after_header_content() { | |
echo '<div class="page-description">'; | |
echo '<h1 itemprop="headline" class="page-title">' . get_the_title() . '</h1>'; // display page title |