Home › Forums › Pro Support › How to show tags? › Reply To: How to show tags?
January 29, 2018 at 10:11 pm
#3468
Keymaster
Looks great!
Instead of the $date
format you have set up, you may be able to do this:
add_action( 'after_setup_theme','tu_move_post_meta' );
function tu_move_post_meta() {
remove_action( 'wpsp_after_title','wpsp_add_post_meta_after_title' );
add_action( 'wpsp_after_title','wpsp_add_custom_meta' );
}
function wpsp_add_custom_meta() {
$time_string = '<time class="entry-date published updated" datetime="%1$s">%2$s</time>';
if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) {
$time_string = '<time class="entry-date published" datetime="%1$s">%2$s</time><time class="updated" datetime="%3$s">%4$s</time>';
}
$time_string = sprintf( $time_string,
esc_attr( get_the_date( 'c' ) ),
esc_html( get_the_date() ),
esc_attr( get_the_modified_date( 'c' ) ),
esc_html( get_the_modified_date() )
);
$date = '<a href="' . esc_url( get_permalink() ) . '" rel="bookmark">' . $time_string . '</a>';
$cats = get_the_category_list( ', ');
$tags = get_the_tag_list(' | ',', ');
echo '<div class="mdp-meta">' . $date . ' | ' . $cats . $tags . '</div>' ;
}