Skip to content

Instantly share code, notes, and snippets.

@LateButEarly
Created July 16, 2015 20:33
Show Gist options
  • Select an option

  • Save LateButEarly/98b43211c33d8912c3e0 to your computer and use it in GitHub Desktop.

Select an option

Save LateButEarly/98b43211c33d8912c3e0 to your computer and use it in GitHub Desktop.
example post date shortcode filter
add_filter( 'genesis_post_date_shortcode', 'example_custom_date_shortcode' );
function example_custom_date_shortcode( $atts ) {
$custom_date = the_date( 'Y-m-d', '<p class="custom-date">', '</p>' );
$atts = array(
'after' => '',
'before' => '',
'format' => $custom_date,
'label' => '',
);
return $atts;
}
@pmgllc
Copy link

pmgllc commented Jul 16, 2015

add_filter( 'genesis_post_date_shortcode', 'hueman_genesis_date_shortcode' );
function hueman_genesis_date_shortcode( $atts ) {

$custom_date = the_date( 'M d, Y', FALSE );

$atts = array(
    'after' => '',
    'before' => '',
    'format' => $custom_date,
    'label' => '',
);

return $atts;

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment