Skip to content

Instantly share code, notes, and snippets.

/*
Home Widgets
---------------------------------------------------------------------------------------------------- */
#home-middle,
#home-featured,
#home-bottom {
clear: both;
margin: 0 32px 16px 32px;
}
<?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',
<?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(
<?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' );
<?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 ) {
<?php
/** Do NOT include the opening php tag */
add_filter( 'genesis_breadcrumb_args', 'sc_breadcrumb_args' );
/**
* Add Clearfix to breadcrumb <div>
*
*/
function sc_breadcrumb_args( $args ) {
<?php
/** Do NOT include the opening php tag */
add_filter( 'genesis_breadcrumb_args', 'sc_breadcrumb_args' );
/**
* Custom Breadcrumbs
*
*/
function sc_breadcrumb_args( $args ) {
<?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
<?php
/** Do NOT include the opening php tag */
/** Add Rss Icon To Menu */
add_filter( 'genesis_nav_items', 'sc_nav_rss', 10, 2 );
add_filter( 'wp_nav_menu_items', 'sc_nav_rss', 10, 2 );
function sc_nav_rss($menu, $args) {
$args = (array)$args;
<?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);