WordPress Reference
< All Topics
Print

X Theme Pro: How to display post tags at the end of posts

I am using the X Theme Pro Ethos Stack on my X Theme Pro development site, and tags I entered were not displaying on posts. Entering the following code on the X Theme Pro child theme’s functions.php file solved the problem for me.

// Add tags after the content for Ethos
// =============================================================================
function add_ethos_post_tags(){
  if ( x_get_stack() == 'ethos' ) : ?>
    <?php if ( has_tag() ) : ?>
      <footer class="entry-footer cf">
        <?php echo get_the_tag_list( '<p><i class="x-icon-tags" data-x-icon="&#xf02c;"></i>'. __( 'Tags:', '__x__'), ', ', '</p>' ); ?>
      </footer>
    <?php endif; ?>
  <?php endif;
}
add_action('x_after_the_content_end', 'add_ethos_post_tags');
// =============================================================================

 

According to X Theme Support, the Ethos Stack does not display tags by default

Source Link

https://theme.co/forum/t/how-can-i-show-tags-in-my-every-post/72085/5

Table of Contents