Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1036331
    dmick89
    Participant

    I’d like to add post tags to the bottom of the post using the Ethos layout. An example picture is attached. How might I go about adding these to the theme? Thanks a lot for your help.

    #1036830
    Rue Nel
    Moderator

    Hello There,

    Thanks for writing in! To add post tags to the bottom of the posts using Ethos stack, what you are trying to accomplish requires a template customization, we would like to suggest that you use a child theme. This allows you to make code changes that won’t be overwritten when an X update is released. After your child theme is setup, please review how we recommend making template changes in Customization Best Practices.

    Once you already have your child theme active and ready, please insert this following code in your child theme’s functions.php file.

    // 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=""></i>'. __( 'Tags:', '__x__'), ', ', '</p>' ); ?>
          </footer>
        <?php endif; ?>
      <?php endif;
    }
    add_action('x_after_the_content_end', 'add_ethos_post_tags');
    // =============================================================================

    Please let us know if this works out for you.

    #1039945
    dmick89
    Participant

    Thank you. That works well. Appreciate the help.

    #1040093
    Rupok
    Member

    You are welcome!

    Glad that it helped. Feel free to let us know if you face any other issue. We’ll be happy to assist you.

    Thanks for using X.

    Cheers!

  • <script> jQuery(function($){ $("#no-reply-1036331 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>