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
.overlay { | |
background-color: #666; | |
opacity: .7; | |
bottom:0;left:0; | |
height:65px; | |
position:fixed; | |
width:100%; | |
z-index:1000; | |
} | |
a.overlay-button { |
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
function sc_bottom_overlay() { | |
if ( in_category ( 'genesis themes' ) ) { // Only display if in category | |
$button_text = 'Purchase'; // Button Text | |
$link_uri = 'http://YOUR_LINK_HERE'; // Url for button Link | |
$overlay = '<div class="overlay"><span style="opacity:1;"><a class="overlay-button" href="'. $link_uri .'">'. $button_text .'</a></span></div>'; | |
echo $overlay; | |
} | |
} | |
add_action( 'genesis_after_footer', 'sc_bottom_overlay' ); |
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 | |
/** DO NOT INCLUDE THE <?php **/ | |
add_action('admin_menu' , 'sc_gsp_extend_cpt_menu'); | |
function sc_gsp_extend_cpt_menu() { | |
add_submenu_page('edit.php?post_type=portfolio', 'Portfolio Settings', 'Settings', 'edit_posts', basename(__FILE__), 'custom_function'); | |
} |
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 | |
/** 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); |
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 | |
/** 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 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 | |
/** 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 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 // 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' ); |