Hi @Kenta,
For this, you’ll need to create a child theme. You can find more details on creating child theme HERE. Then in your child theme’s functions.php
, add the following codes.
/**
* Adding tags in header_meta
*
*/
function adventurous_header_meta() {
$date = sprintf( '<a href="%1$s" title="%2$s" rel="bookmark"><time class="entry-date" datetime="%3$s">%4$s</time></a>',
esc_url( get_permalink() ),
esc_attr( get_the_time() ),
esc_attr( get_the_date( 'c' ) ),
esc_html( get_the_date() )
);
$author = sprintf( '<span class="author vcard"><a class="url fn n" href="%1$s" title="%2$s" rel="author">%3$s</a></span>',
esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
esc_attr( sprintf( __( 'View all posts by %s', 'adventurous' ), get_the_author() ) ),
get_the_author()
);
// Translators: used between list items, there is a space after the comma.
$tag_list = get_the_tag_list( '', __( ', ', 'adventurous' ) );
// Translators: 1 is category, 2 is tag, 3 is the date and 4 is the author's name.
if ( $tag_list ) {
$utility_text = __( '<span class="on-date">Posted on %1$s</span><span class="by-author"> by %2$s</span> | </span><span class="in-tag">Tagged %3$s</span>', 'adventurous' );
}else{
// Translators: 1 is category, 2 is tag, 3 is the date and 4 is the author's name.
$utility_text = __( '<span class="on-date">Posted on %1$s</span><span class="by-author"> by %2$s</span>', 'adventurous' );
}
printf(
$utility_text,
$date,
$author,
$tag_list
);
}
Regards,
Mahesh