This file contains hidden or 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( 'the_content', 'dc_cleanse_that_sucker' ); | |
function dc_cleanse_that_sucker ( $glop ) { | |
// do your stuff here | |
return $glop; | |
} |
This file contains hidden or 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
/** display custom field - simple method **/ | |
add_action( 'genesis_entry_footer', 'dc_quickie_custom_field', 1 ); | |
function dc_quickie_custom_field() { | |
if ( genesis_get_custom_field('poop') ) { | |
echo genesis_get_custom_field('poop'); | |
} | |
} |
This file contains hidden or 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( 'genesis_after_header', 'dc_put_in_my_section' ); | |
function dc_put_in_my_section() { | |
echo '<section>'; | |
} | |
add_action( 'genesis_before_footer', 'dc_put_in_my_section_two' ); | |
function dc_put_in_my_section_two() { | |
echo '</section>'; | |
} |
This file contains hidden or 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
/*********************************************************************** | |
The trick is to have the "last state" defined first. Otherwise, it fades and then reappears! | |
If you are fading in, this isn't needed, because default is "in". :) | |
************************************************************************************/ | |
.entry-title { | |
opacity: 0; | |
-webkit-animation: fading 5s; /* Chrome, Safari, Opera */ | |
animation: fading 5s; | |
} |
This file contains hidden or 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_site-title', 'dc_veit_site_title' ); | |
function dc_veit_site_title( $attributes ) { | |
$attributes['itemprop'] = 'nonheadline'; | |
return $attributes; | |
} | |
add_filter( 'genesis_attr_entry-title', 'dc_veit_entry_title' ); | |
function dc_veit_entry_title( $attributes ) { | |
$attributes['itemprop'] = 'whatever'; | |
return $attributes; |
This file contains hidden or 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_post_info', 'dc_post_info_filter', 20 ); | |
function dc_post_info_filter($post_info) { | |
if ( is_home() ) { | |
$var = do_shortcode('[post_comments zero="No Comments" one="1 Comment" more="% Comments"]'); | |
} | |
return $post_info; | |
} |
This file contains hidden or 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
/** Dave's CSS ***************/ | |
.entry-comments li { | |
list-style-type: none; | |
padding: 20px; | |
} | |
.entry-comments .comment-respond { | |
padding: 20px; | |
} | |
.entry-comments .reply { |
This file contains hidden or 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
// dave add published comments. | |
add_action('sensei_single_main_content', 'dc_add_comments_to_template'); | |
function dc_add_comments_to_template() { | |
//Gather comments on the post | |
$comments = get_comments(array( | |
'post_id' => get_the_ID(), | |
'status' => 'approve' //Change this to the type of comments to be displayed | |
)); |