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
<?php | |
add_action( 'init', 'sample_remove_entry_meta', 11 ); | |
/** | |
* Remove entry meta for post types | |
* | |
* @link https://gist.github.com/nathanrice/03a5871e5e5a27f22747 | |
*/ | |
function sample_remove_entry_meta() { | |
remove_post_type_support( 'post-type', 'genesis-entry-meta-before-content' ); |
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
function genesis_truncate_phrase( $text, $max_characters ) { | |
if ( ! $max_characters ) { | |
return ''; | |
} | |
$text = trim( $text ); | |
if ( mb_strlen( $text ) > $max_characters ) { |
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
<?php | |
/* | |
Add back Schema.org/blogPosting microdata to post entries. | |
Replace all instances of "themedemo" with something unique to your site. | |
User input is required in the last function. Be sure to fill these fields in with your own information. | |
Instances where you need to fill in information will be marked with a comment that indicates so. | |
*/ |
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 Accessibility support | |
add_theme_support( 'genesis-accessibility', array( 'headings', 'drop-down-menu', 'search-form', 'skip-links' ) ); |
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
/* ## Screen reader text | |
--------------------------------------------- */ | |
.screen-reader-text, | |
.screen-reader-text span, | |
.screen-reader-shortcut { | |
position: absolute !important; | |
clip: rect(0, 0, 0, 0); | |
height: 1px; | |
width: 1px; |
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
<?php | |
// this snippet requires PHP 5.3+ | |
add_action( 'wp_enqueue_scripts', function() { | |
wp_register_style( 'atomic-blocks/ab-cta', '/path/to/atomic-blocks/css/ab-cta.css', array(), 1.0.0 ); | |
} ); | |
add_filter( 'render_block', function( $block_content, $block ) { | |
if ( 'atomic-blocks/ab-cta' === $block['blockName'] ) { | |
ob_start(); | |
wp_print_styles( $block['blockName'] ); |
OlderNewer