This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//* Setup widget counts | |
function dynamik_count_widgets( $id ) { | |
global $sidebars_widgets; | |
if ( isset( $sidebars_widgets[ $id ] ) ) { | |
return count( $sidebars_widgets[ $id ] ); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Beaver Builder */ | |
.beaver-page.fl-builder .content, | |
.beaver-page.fl-builder .content .page, | |
.beaver-page.fl-builder .content-sidebar-wrap, | |
.beaver-page.fl-builder .site-container, | |
.beaver-page.fl-builder .site-inner { | |
background: none; | |
border: 0; | |
float: none; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery(document).ready(function($){ | |
// Two Column Comment Form | |
// Author: Bill Erickson | |
// URL: http://www.billerickson.net/code/two-column-comment-form/ | |
if( $('.comment-form-author').length ) { | |
$('.comment-form').prepend( '<div class="ez-only comment-form-full" />' ); | |
$('.comment-form').prepend( '<div class="one-third comment-form-right" />' ); | |
$('.comment-form').prepend( '<div class="one-third comment-form-middle" />' ); | |
$('.comment-form').prepend( '<div class="one-third first comment-form-left" />' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
genesis_register_sidebar( array( | |
'id' => 'widget-drawer', | |
'name' => __( 'Big Menu', 'dynamik-gen' ), | |
'description' => __( 'This is the widget area for the big menu.', 'dynamik-gen' ), | |
) ); | |
//* Hook the widget-drawer-area to after_header | |
add_action( 'genesis_after_header', 'dynamik_big_menu', 10 ); | |
function dynamik_big_menu() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* needs a link with class .drawer-toggle and a div .widget-drawer*/ | |
jQuery(document).ready(function(){ | |
jQuery(".drawer-toggle").click(function(){ | |
jQuery(".widget-drawer").slideToggle("slow"); | |
}); | |
}); | |
//*Alternative version with auto-link in site-title area: | |
( function( $ ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//* Create a custom header and menu | |
//* Remove 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); | |
//* Unregister header-right widget-area | |
unregister_sidebar( 'header-right' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Filter Genesis H1 Post Titles to add <span> for styling | |
* | |
*/ | |
add_filter( 'genesis_post_title_output', 'ac_post_title_output', 15 ); | |
function ac_post_title_output( $title ) { | |
if ( is_singular() ) | |
$title = sprintf( '<h1 class="entry-title"><span>%s</span></h1>', apply_filters( 'genesis_post_title_text', get_the_title() ) ); | |
return $title; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//*https://journalxtra.com/wordpress/quicksnips/use-wordpress-featured-image-post-page-background-picture/ | |
add_action( 'wp_head', 'vr_set_featured_background', 99); | |
function vr_set_featured_background() { | |
$image_url = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), full, false ); | |
if ($image_url[0]) { | |
//* Close php tag for body styles | |
?> | |
<style> | |
body { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'genesis_attr_body', 'custom_add_css_attr' ); | |
function custom_add_css_attr( $attributes ) { | |
// add original plus extra CSS classes | |
$attributes['class'] .= ' parallax'; | |
$attributes['data-diff'] = '100'; | |
// return the attributes | |
return $attributes; | |
} |