Skip to content

Instantly share code, notes, and snippets.

// Custom Hook Box code
<div class="my-home-slider">
<div class="my-home-slider-wrap">
<?php echo do_shortcode( '[home_slider]' ); ?>
</div>
</div>
// Custom CSS code example #1
.my-home-slider {
background: #222;
@cobaltapps
cobaltapps / Genesis Simple Sidebars Custom Post Type Support
Last active March 7, 2019 02:32
Use this code snippet to add Genesis Simple SIdebars meat options to Custom Post Types (Genesis Simple Sidebars Plugin required, of course)
add_action( 'init', 'custom_add_ss_post_type_support' );
/**
* Add Genesis Simple Sidebars In-Post options into Custom Post Types.
*/
function custom_add_ss_post_type_support() {
foreach( get_post_types( array( 'public' => true ) ) as $post_type )
add_post_type_support( $post_type, 'genesis-simple-sidebars' );
}
@cobaltapps
cobaltapps / Enable HTML5 markup in Genesis 2.0+ Child Themes
Last active March 7, 2019 02:32
Add this code to your Genesis 2.0+ Child Theme's functions.php file (or the Custom Functions option in Dynamik Website Builder, Prose Child Theme or the Genesis Extender Plugin) to enable the HTML5 markup.
// Enable HTML5 markup
add_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list' ) );
@cobaltapps
cobaltapps / Progressive Responsive Content (4th trigger point)
Created August 5, 2013 13:56
This code goes into the 4th @media query box in Dynamik Design > Responsive for "Progressive" Content, meaning the Content and Sidebar areas stay side-by-side until further into the narrowing of the browser width.
body.override .content { width: 100%; } body.override .sidebar-primary { width: 100%; float: left; } .sidebar-primary { margin: 20px 0 0; }
@cobaltapps
cobaltapps / Progressive Responsive Content (2nd trigger point)
Created August 5, 2013 13:55
This code goes into the 2nd @media query box in Dynamik Design > Responsive for "Progressive" Content, meaning the Content and Sidebar areas stay side-by-side until further into the narrowing of the browser width.
body.override .content { width: auto; margin-right: 300px; } body.override .sidebar-primary { margin-left: -280px; float: right; }
@cobaltapps
cobaltapps / Progressive Responsive Content (1st trigger point)
Created August 5, 2013 13:54
This code goes into the 1st @media query box in Dynamik Design > Responsive for "Progressive" Content, meaning the Content and Sidebar areas stay side-by-side until further into the narrowing of the browser width.
body.override .content-sidebar-wrap { width: 100%; } body.override .site-inner { padding-bottom: 10px; } .content { padding: 0; } body.override .breadcrumb { margin: 0 0 30px; }
@cobaltapps
cobaltapps / Genesis Header, Primary Menu (Above Header), and Footer Fluid
Last active March 7, 2019 02:33
Making your Genesis Header, Primary Menu, and Footer Fluid by "breaking it out" of your main site container.
@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 */
@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 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 */