Skip to content

Instantly share code, notes, and snippets.

@cobaltapps
cobaltapps / margin-top-ez-widget-area
Created January 19, 2013 16:33
Add a margin to the top and bottom of ez-widget-areas, giving them a bit of room to breathe.
.ez-widget-area {
margin: 40px 0;
}
@cobaltapps
cobaltapps / Portfolio Genesis Page Template
Created March 18, 2013 18:11
This is a simple "Portfolio" Custom Page Template for the Genesis Framework.
<?php
/*
Template Name: Portfolio
*/
/** Force the full width layout on the Portfolio page */
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );
/** Remove the standard loop */
remove_action( 'genesis_loop', 'genesis_do_loop' );
@cobaltapps
cobaltapps / Custom "Portfolio" Widget Area
Last active March 7, 2019 02:37
Registering a Custom "Portfolio" Widget Area in Genesis.
genesis_register_sidebar(
array(
'id' => 'portfolio',
'name' => __( 'Portfolio', 'dynamik' ),
'description' => __( 'This is the portfolio page.', 'dynamik' )
)
);
@cobaltapps
cobaltapps / "Portfolio" Genesis Template Custom Hook Box Code
Created March 18, 2013 19:11
Dynamik for Genesis Custom Hook Box code used to create a Custom "Portfolio" Page Template remplacement.
<?php
/** Force the full width layout on the Portfolio page */
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );
/** Remove the standard loop */
remove_action( 'genesis_loop', 'genesis_do_loop' );
/** Add the Portfolio widget area */
add_action( 'genesis_loop', 'balance_portfolio_widget' );
function balance_portfolio_widget() {
@cobaltapps
cobaltapps / Genesis Header Fluid
Last active March 7, 2019 02:36
Making your Genesis Header Fluid by "breaking it out" of your main site container.
/* Fluid Header */
remove_action( 'genesis_header', 'genesis_header_markup_open', 5 );
remove_action( 'genesis_header', 'genesis_do_header' );
remove_action( 'genesis_header', 'genesis_header_markup_close', 15 );
add_action( 'genesis_before', 'genesis_header_markup_open' );
add_action( 'genesis_before', 'genesis_do_header' );
add_action( 'genesis_before', 'genesis_header_markup_close' );
/* end Fluid Header */
@cobaltapps
cobaltapps / Genesis Footer Fluid
Last active March 7, 2019 02:36
Making your Genesis Footer Fluid by "breaking it out" of your main site container.
@cobaltapps
cobaltapps / Genesis Primary Menu (Above Header) Fluid
Created August 4, 2013 18:57
Making your Genesis Primary Menu Fluid by "breaking it out" of your main site container.
/* Fluid Primary Menu (Above Header) */
remove_action( 'genesis_before_header', 'genesis_do_nav' );
add_action( 'genesis_before', 'genesis_do_nav' );
/* end Fluid Menus */
@cobaltapps
cobaltapps / Genesis Primary Menu (Below Header) Fluid
Created August 4, 2013 18:58
Making your Genesis Primary Menu Fluid by "breaking it out" of your main site container.
/* Fluid Primary Menu (Below Header) */
remove_action( 'genesis_after_header', 'genesis_do_nav' );
add_action( 'genesis_before', 'genesis_do_nav' );
/* end Fluid Menus */
@cobaltapps
cobaltapps / Genesis Secondary Menu (Above Header) Fluid
Last active March 7, 2019 02:34
Making your Genesis Secondary Menu Fluid by "breaking it out" of your main site container.
/* Fluid Secondary Menu (Above Header) */
remove_action( 'genesis_before_header', 'genesis_do_subnav' );
add_action( 'genesis_before', 'genesis_do_subnav' );
/* end Fluid Menus */
@cobaltapps
cobaltapps / Genesis Secondary Menu (Below Header) Fluid
Created August 4, 2013 18:59
Making your Genesis Secondary Menu Fluid by "breaking it out" of your main site container.
/* Fluid Secondary Menu (Below Header) */
remove_action( 'genesis_before_header', 'genesis_do_subnav' );
add_action( 'genesis_before', 'genesis_do_subnav' );
/* end Fluid Menus */