Hi @philhuhn, thanks, but this (URI link change) does not solve my problem. Even with this code require get_stylesheet_directory_uri() . '/inc/template-tags.php'
it’s impossible to load that piece of lovely code. Finally, after some RTFM readings I know why (links in my previous post).
Anyway -> Problem solved, here’s an updated child theme functions.php
:
add_action( 'after_setup_theme', function() {
add_filter( 'twentytwenty_post_meta_location_single_top', function() {
?>
<div class="post-meta-wrapper<?php echo esc_attr( $post_meta_wrapper_classes ); ?>">
<ul class="post-meta<?php echo esc_attr( $post_meta_classes ); ?>">
<li class="post-date meta-wrapper">
<span class="meta-icon">
<span class="screen-reader-text"><?php _e( 'Post date', 'twentytwenty' ); ?></span>
<?php twentytwenty_the_theme_svg( 'calendar' ); ?>
</span>
<span class="meta-text">
<a href="<?php echo get_day_link(get_post_time('Y'), get_post_time('m'), get_post_time('j')); ?>"><?php the_time( get_option( 'date_format' ) ); ?></a>
</span>
</li>
<?php
$post_tags = get_the_tags();
if ( ! empty ( $post_tags ) ) {
?>
<li class="post-tags meta-wrapper">
<span class="meta-icon">
<span class="screen-reader-text"><?php _e( 'Tags', 'twentytwenty' ); ?></span>
<?php twentytwenty_the_theme_svg( 'tag' ); ?>
</span>
<span class="meta-text">
<?php the_tags( '', ', ', '' ); ?>
</span>
</li>
<?php
}
//else { echo 'no tags'; }
?>
<?php
if ( ! empty ( $comments ) ) {
?>
<li class="post-comment-link meta-wrapper">
<span class="meta-icon">
<?php twentytwenty_the_theme_svg( 'comment' ); ?>
</span>
<span class="meta-text">
<?php comments_popup_link(); ?>
</span>
</li>
<?php
}
//else { echo 'no comments'; }
?>
<?php
if ( is_sticky() ) {
?>
<li class="post-sticky meta-wrapper">
<span class="meta-icon">
<?php twentytwenty_the_theme_svg( 'bookmark' ); ?>
</span>
<span class="meta-text">
<?php _e( 'Sticky post', 'twentytwenty' ); ?>
</span>
</li>
<?php
}
//else { echo 'not a sticky post'; }
?>
</ul>
</div>
<?php
}
);
}
);
And remove tags in the bottom:
add_filter(
'twentytwenty_post_meta_location_single_bottom',
array(
//'tags',
)
);