Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Update Genesis comments to include only the date, not the time, the comment was posted.
<?php
// Completely remove the date and time from comments.
add_filter( 'genesis_show_comment_date', '__return_false' );
<?php
add_filter( 'genesis_markup_comment-time-link_content', 'leaven_remove_comment_time' );
/**
* Remove time from comments.
* @return string
*/
function leaven_remove_comment_time() {
return get_comment_date();
}
<?php
// Note: This code is copied directly from the Genesis Framework, markup.php file, lines 131-141.
/**
* Contextual filter to modify 'content'.
*
* @since 2.6.0
*
* @param string $content Content being passed through Markup API.
* @param array $args Array with markup arguments.
*
* @see genesis_markup $args Array.
*/
$content = apply_filters( "genesis_markup_{$args['context']}_content", $args['content'], $args );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.