Skip to content

Instantly share code, notes, and snippets.

@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 / 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 / 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 (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 / 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 / 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' );
}
// 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 / Enqueue an external Custom Stylesheet to Dynamik Website Builder
Last active March 7, 2019 02:31
Use this code if you'd like to use an external Custom Stylesheet in Dynamik Website Builder. Note that this code assumes you have created a my-custom.css file and uploaded it to your /wp-content/uploads/dynamik-gen/theme/ directory.
add_action( 'wp_enqueue_scripts', 'custom_add_stylesheet' );
/**
* Enqueue an external Custom Stylesheet to Dynamik Website Builder
*/
function custom_add_stylesheet()
{
wp_enqueue_style( 'my-custom', dynamik_get_stylesheet_location( 'url' ) . 'my-custom.css', false, filemtime( dynamik_get_stylesheet_location( 'path' ) . 'my-custom.css' ) );
}
add_action( 'wp_enqueue_scripts', 'custom_enqueue_scripts' );
/**
* Enqueue an external Custom Javascript file to Dynamik Website Builder
*/
function custom_enqueue_scripts()
{
wp_enqueue_script( 'my-scripts', dynamik_get_stylesheet_location( 'url' ) . 'my-scripts.js', array( 'jquery' ), CHILD_THEME_VERSION, true );
}
@cobaltapps
cobaltapps / Catalyst EZ Column Class Styles
Created August 20, 2013 17:28
This may be useful if you decided to continue using the Catalyst EZ Column Classes in your Catalyst-to-Genesis converted websites.
/*** EZ Column Styles ***/
.ez-five-sixths,
.ez-four-fifths,
.ez-four-sixths,
.ez-one-fifth,
.ez-one-fourth,
.ez-one-half,
.ez-one-sixth,
.ez-one-third,