Tagged: x
-
AuthorPosts
-
June 10, 2016 at 2:42 pm #1036331
dmick89ParticipantI’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.
June 10, 2016 at 9:34 pm #1036830
Rue NelModeratorHello 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.
June 13, 2016 at 12:03 pm #1039945
dmick89ParticipantThank you. That works well. Appreciate the help.
June 13, 2016 at 1:32 pm #1040093
RupokMemberYou 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!
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1036331 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
