Hi Andrew,
Thanks for all your previous help. New issue, related to some of my previous one. For some reason I’m having a new issue where the date posted is missing for most posts (but not all).
Any thoughts?
Site here: http://www.somethingsbrewing.com/
And custom CSS/JS:
/* CSS for Byline */
.entry-header .entry-meta span {
display: inline-block;
margin-right: 5px;
}
.entry-header .entry-meta span:before,
.entry-header .entry-meta a:before {
content: none !important;
}
.single .entry-header .entry-meta .entry-date:before {
content: none;
}
if ( ! function_exists( ‘puro_posted_on’ ) ) :
/**
* Prints HTML with meta information for the current post-date/time and author.
*/
function puro_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 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() )
);
$posted_on = sprintf(
esc_html_x( ‘Posted on %s’, ‘post date’, ‘puro’ ),
‘‘ . $time_string . ‘‘
);
$byline = sprintf(
esc_html_x( ‘by %s’, ‘post author’, ‘puro’ ),
‘<span class=”author vcard”>‘ . esc_html( get_the_author() ) . ‘</span>’
);
$cats = sprintf(
esc_html_x( ‘in %s’, ‘categories in’, ‘puro’ ),
get_the_category_list( __( ‘, ‘, ‘puro’ ) )
);
echo ‘<span class=”posted-on”>’ . $posted_on . ‘</span><span class=”byline”> ‘ . $byline . ‘</span><span class=”cat-links”>’. $cats .'</span>’; // WPCS: XSS OK.
}
endif;