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
/* | |
Home Widgets | |
---------------------------------------------------------------------------------------------------- */ | |
#home-middle, | |
#home-featured, | |
#home-bottom { | |
clear: both; | |
margin: 0 32px 16px 32px; | |
} |
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
<?php // Do Not include this line | |
// Home page widgets | |
genesis_register_sidebar( array( | |
'id' => 'home-featured-full', | |
'name' => __( 'Home Featured Full', 'CHILD_THEME_NAME' ), | |
'description' => __( 'This is the featured area if you want full width.', 'CHILD_THEME_NAME' ), | |
) ); | |
genesis_register_sidebar( array( | |
'id' => 'home-featured-left', |
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
<?php // Do Not include this line | |
// Home feature widget section | |
function sc_home_do_featured() { | |
if ( is_active_sidebar( 'home-featured-full' ) || is_active_sidebar( 'home-featured-left' ) || is_active_sidebar( 'home-featured-right' ) ) { | |
echo '<section id="home-featured" class="clearfix"><div class="wrap">'; | |
genesis_widget_area( 'home-featured-full', array( |
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
<?php // Do Not include this line | |
// Execute custom home page. If no widgets active, then loop | |
add_action( 'genesis_meta', 'sc_custom_home_loop' ); | |
function sc_custom_home_loop() { | |
if ( is_active_sidebar( 'home-featured-full' ) || is_active_sidebar( 'home-featured-left' ) || is_active_sidebar( 'home-featured-right' ) || is_active_sidebar( 'home-middle-1' ) || is_active_sidebar( 'home-middle-2' ) || is_active_sidebar( 'home-middle-3' ) || is_active_sidebar( 'home-bottom' ) ) { | |
remove_action( 'genesis_loop', 'genesis_do_loop' ); | |
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' ); |
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
<?php | |
/** Do NOT include the opening php tag */ | |
add_filter ( 'genesis_home_crumb', 'sc_breadcrumb_home_portfolio_link' ); | |
/** | |
* Modify Home link on portfolio custom post type | |
* | |
*/ | |
function sc_breadcrumb_home_portfolio_link( $crumb ) { |
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
<?php | |
/** Do NOT include the opening php tag */ | |
/** Remove Post Info for Custom Post Types */ | |
function sc_remove_cpt_post_info( $query ) { | |
if ( is_post_type_archive('CHANGE TO YOUR CPT') ) { | |
// Remove the post info function | |
remove_action( 'genesis_before_post_content', 'genesis_post_info' ); // Use this line if using pre Genesis 2.0 | |
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
<?php | |
/** Do NOT include the opening php tag */ | |
/** Offset posts on homepage */ | |
add_action( 'pre_get_posts', 'sc_home_page_post_offset' ); | |
function sc_home_page_post_offset( $query ) { | |
if ( is_home() ) | |
$query->set ( 'offset', 1); |
NewerOlder