rbaguley
Forum Replies Created
-
Forum: Themes and Templates
In reply to: [Nirmala] Two questions: scaling and datesManaged to figure this out myself, so for those finding this question, the answer to the second question (on two dates appearing) is the function ‘nirmala_posted_on’ in the file template-tags.php in the folder inc. I rewrote that to read:
`if ( ! function_exists( ‘nirmala_posted_on’ ) ) {
function nirmala_posted_on() {
$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_string = sprintf( $time_string,
esc_attr( get_the_date( ‘c’ ) ),
esc_html( get_the_date() ));
$posted_on = apply_filters(
‘nirmala_posted_on’, sprintf(
‘<span class=”posted-on mr-2″><i class=”fa fa-clock-o” aria-hidden=”true”></i> %2$s</span>’,
esc_url( get_permalink() ),
apply_filters( ‘nirmala_posted_on_time’, $time_string )
)
);
$byline = apply_filters(
‘nirmala_posted_by’, sprintf(
‘<span class=”byline”><i class=”fa fa-user-circle-o” aria-hidden=”true”></i> <span class=”author vcard”>%2$s</span></span>’,
esc_url( get_author_posts_url( get_the_author_meta( ‘ID’ ) ) ),
esc_html( get_the_author() )
)
);
echo $posted_on . $byline; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
}
}’