Skip to content

Instantly share code, notes, and snippets.

@DalavanCloud
DalavanCloud / Genesis Header, Primary Menu (Above Header), and Footer Fluid Making your Genesis Header, Primary Menu, and Footer Fluid by "breaking it out" of your main site container.
@DalavanCloud
DalavanCloud / Progressive Responsive Content (1st trigger point)
Created March 7, 2019 02:33 — forked from cobaltapps/Progressive Responsive Content (1st trigger point)
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; }
@DalavanCloud
DalavanCloud / Progressive Responsive Content (2nd trigger point)
Created March 7, 2019 02:33 — forked from cobaltapps/Progressive Responsive Content (2nd trigger point)
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; }
@DalavanCloud
DalavanCloud / Progressive Responsive Content (4th trigger point)
Created March 7, 2019 02:32 — forked from cobaltapps/Progressive Responsive Content (4th trigger point)
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; }
@DalavanCloud
DalavanCloud / Enable HTML5 markup in Genesis 2.0+ Child Themes
Created March 7, 2019 02:32 — forked from cobaltapps/Enable HTML5 markup in Genesis 2.0+ Child Themes
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' ) );
@DalavanCloud
DalavanCloud / Genesis Simple Sidebars Custom Post Type Support
Created March 7, 2019 02:32 — forked from cobaltapps/Genesis Simple Sidebars Custom Post Type Support
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;
@DalavanCloud
DalavanCloud / Enqueue an external Custom Stylesheet to Dynamik Website Builder 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 );
}
@DalavanCloud
DalavanCloud / Catalyst EZ Column Class Styles
Created March 7, 2019 02:29 — forked from cobaltapps/Catalyst EZ Column Class Styles
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,