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
// Code to Display Featured Image with Caption on top of the post | |
// @link https://sridharkatakam.com/add-featured-images-entry-single-posts-genesis/ | |
add_action( 'genesis_before_entry', 'featured_post_image', 8 ); | |
function featured_post_image() { | |
if ( ! is_singular( 'post' ) ) { | |
return; | |
} | |
$image = genesis_get_image( 'format=url&size=post-image' ); // get the URL of featured image. |
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 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 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
.wp-caption-text { | |
font-size: 18px; | |
font-size: 1.8rem; | |
font-weight: 700; | |
margin: 0; | |
text-align: left; | |
background: #fff; | |
border-bottom: 1px solid #ddd; | |
padding: 17px 0 17px 24px; | |
line-height: 120%; |
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 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 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
.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 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 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 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 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 |