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_before_entry', '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
// ADD NEXT/PREV POST + Add Featured Images To Previous & Next Post Nav Links | |
add_action('genesis_after_entry', 'wpsites_image_nav_links', 9 ); | |
/** | |
* @author Brad Dalton | |
* @link http://wpsites.net/web-design/add-featured-images-to-previous-next-post-nav-links/ | |
* //https://crunchify.com/how-to-display-last-updated-on-datetime-of-your-wordpress-blog-post-genesis-framework-hook-included/ | |
//https://stackoverflow.com/questions/7563568/display-post-date-on-previous-next-link | |
// https://sridharkatakam.com/add-links-previous-post-next-post-single-posts-genesis/ | |
*/ | |
function wpsites_image_nav_links() { |
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
//* Next Post Links below Commments Section | |
function leaguewp_prev_next_post_nav() { | |
if ( is_singular( 'post' ) ) { | |
echo '<div class="prev-next-navigation">'; | |
previous_post_link( '<div class="previous"><span>Next Post</span><br> %link</div>', '%title' ); | |
echo '</div>'; | |
} | |
} | |
add_action( 'genesis_after_comments', 'leaguewp_prev_next_post_nav', 9 ); |
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
//* Next Post Link | |
function leaguewp_prev_next_post_nav() { | |
if ( is_singular( 'post' ) ) { | |
echo '<div class="prev-next-navigation">'; | |
previous_post_link( '<div class="previous"><span>Next Post</span><br> %link</div>', '%title' ); | |
//next_post_link( '<div class="next">Next Post: %link</div>', '%title' ); | |
echo '</div>'; | |
} | |
} | |
add_action( 'genesis_before_footer', 'leaguewp_prev_next_post_nav' ); |
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
/*------------- Next Post Link -------------*/ | |
.previous a { | |
text-decoration: none; | |
color: #ffd700; | |
text-transform: inherit; | |
font-family: Playfair Display, Lato; | |
margin: 2%; | |
padding: 2%; | |
} |
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
//* Force full-width-content layout | |
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' ); | |
//* Remove post meta | |
remove_action( 'genesis_entry_footer', 'genesis_post_meta' ); | |
//* Re-position post info | |
remove_action( 'genesis_entry_header', 'genesis_post_info', 12 ); | |
add_action( 'genesis_entry_header', 'genesis_post_info', 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
/* Enter Your Custom CSS Here */ | |
.single .site-container { | |
background: white; | |
max-width: 90%; | |
overflow: hidden; | |
width: 1400px; | |
margin: 0 auto; | |
} | |
.single .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
/*----- Display Logo before Site Title -----*/ | |
add_action( 'genesis_header', 'lwp_site_image', 5 ); | |
function lwp_site_image() { | |
$header_image = get_header_image() ? '<img alt="" src="' . get_header_image() . '" />' : get_avatar( get_option( 'admin_email' ), 224 ); | |
printf( '<div class="site-image">%s</div>', $header_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
/*----- Display Logo before Site Title -----*/ | |
add_action( 'genesis_header', 'lwp_site_image', 5 ); | |
function lpw_site_image() { | |
$header_image = '<img src="https://freeiconshop.com/files/edd/person-girl-flat.png" alt="" />'; | |
printf( '<div class="site-image">%s</div>', $header_image ); |