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_action( 'init', 'cd_add_editor_styles' ); | |
/** | |
* Apply theme's stylesheet to the visual editor. | |
* | |
* @uses add_editor_style() Links a stylesheet to visual editor | |
* @uses get_stylesheet_directory_uri() Returns URI of childtheme stylesheet directory | |
*/ | |
function cd_add_editor_styles() { | |
add_editor_style( get_stylesheet_directory_uri().'/assets/editorstyles.css' ); |
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
// * Relocate titles on Page, Post and other single pages | |
add_action( 'genesis_after_header','relocate_entry_title_singular' ); | |
function relocate_entry_title_singular() { | |
if ( ! is_singular() ) | |
return; | |
echo '<div class="entry-header-wrapper"><div class="wrap">'; | |
genesis_do_post_title(); | |
genesis_post_info(); | |
echo '</div></div>'; |
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
Default context filters in Genesis | |
Context Filter Schema | |
body genesis_attr_body http://schema.org/WebPage | |
site-header genesis_attr_site-header http://schema.org/WPHeader | |
site-title genesis_attr_site-title | |
site-description genesis_attr_site-description | |
nav-primary genesis_attr_nav-primary http://schema.org/SiteNavigationElement |
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
a:hover, a:active, a:focus { | |
outline: 0; | |
} |
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
remove_action( 'wp_head', 'print_emoji_detection_script', 7 ); | |
remove_action( 'admin_print_scripts', 'print_emoji_detection_script' ); | |
remove_action( 'wp_print_styles', 'print_emoji_styles' ); | |
remove_action( 'admin_print_styles', 'print_emoji_styles' ); |
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(function( $ ){ | |
$(".site-header").after('<div class="bumper"></div>'); | |
$(window).scroll(function () { | |
if ($(document).scrollTop() > 50 ) { | |
$('.site-header').addClass('shrink'); | |
} else { | |
$('.site-header').removeClass('shrink'); |
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
/*You can modify the “darkness” of the image by playing with the SVG used.*/ | |
/*Hint: Use a specific selector, else it will apply to all pics*/ | |
img { | |
filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#grayscale"); | |
-webkit-filter: grayscale(100%); | |
-moz-filter: grayscale(100%); | |
-ms-filter: grayscale(100%); | |
filter: grayscale(100%); | |
filter: gray; /* IE 6-9 */ | |
} |
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 background-color to .footer-widgets | |
add_filter( 'genesis_attr_footer-widgets', 'ap_attributes_footer_widgets' ); | |
function ap_attributes_footer_widgets( $attributes ) { | |
$background = get_field('footer_widgets_bg', option); | |
$attributes['style'] = 'background-color:' . $background . ';'; | |
return $attributes; | |
} |
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
//* Link "your-cpt-name" CPT to categories taxonomy | |
add_action( 'init', 'sk_add_category_taxonomy_to_events' ); | |
function sk_add_category_taxonomy_to_events() { | |
register_taxonomy_for_object_type( 'category', 'your-cpt-name' ); | |
} |