function the_post_metas() { $meta = []; if (valid_meta(the_date_link())) { array_push($meta, the_date_link()); } if (valid_meta(the_author_link())) { array_push($meta, the_author_link()); } if (valid_meta(the_category())) { array_push($meta, the_category()); } if (valid_meta(get_the_tag_list())) { array_push($meta, get_the_tag_list()); } return implode(" | ", $meta); }
<h2 class="blog-post-title"> <a href="<?php the_permalink(); ?> "><?php the_title(); ?> </a> </h2> <p class="blog-post-meta"> <?php echo the_date_link(); ?> <?php echo the_author_link(); ?> <?php the_category(', '); ?> <?php the_tags('', ', '); ?> </p>