Here’s a snippet to make the post date into a link. This snippet only outputs a HTML5 post date, if you need an XHTML version just edit the $new_output
variable.
add_filter( 'genesis_post_meta', 'child_post_meta_filter' );
function child_post_meta_filter($post_meta) {
if ( !is_page() ) {
$post_meta = '""Genesis ';
}
return $post_meta;
}
//* Add permalink to shortcode
add_filter( 'genesis_post_date_shortcode', 'child_customize_post_date_shortcode', 10, 2 );
function child_customize_post_date_shortcode( $output, $atts ) {
global $post;
$defaults = array(
'after' => '',
'before' => '',
'format' => get_option( 'date_format' ),
'label' => '',
);
$atts = shortcode_atts( $defaults, $atts, 'post_date' );
$display = ( 'relative' === $atts['format'] ) ? genesis_human_time_diff( get_the_time( 'U' ), current_time( 'timestamp' ) ) . ' ' . __( 'ago', 'genesis' ) : get_the_time( $atts['format'] );
$new_output = sprintf( '<time %s>', genesis_attr( 'entry-time' ) ) . '<a rel="bookmark" href="' . get_permalink() . '">' . $display . '</a>' . '</time>';
return $new_output;
}
Thanks Gary Jones for help with the filter!