Post-Meta class preventing tags from centering
-
Hi
I have modified the content grid code to allow for tags and custom taxonomies to be displayed. I would like this to be centred, however the <div class=”post-meta”> class is preventing them from being centred unless the there is enough tags to cover more than 1 line.
If any of my taxonomies has enough terms that it needs 2 lines, then it centre’s, however if I only have one term for that post or not enough to cover at least 2 lines then it aligns left.
If I remove the <div class=”post-meta”> class then it will now center correctly, but the tags lose the style formatting.
Is there a way to fix this, or can you tell me what theme file the <div class=”post-meta”> is drawing from so that I can look for myself? I have been unable to find this tag anywhere online so I’m not sure where I need to look to fix the problem.
My code being used currently is below:
<div align="center"> <div class="post-meta"> <?php if ( 'post' === get_post_type() && cd_index_meta_cat() ) : ?> <span class="post-category"> <span class= aria-hidden="true"></span> <span class="screen-reader-text"><?php esc_html_e( 'Categories', 'coldbox' ); ?></span> <?php echo get_the_term_list( $post->ID, 'format','', ', ', '' );?> <br> <br> <?php echo get_the_term_list( $post->ID, 'post_tag','', ', ', '' );?> <?php echo get_the_term_list( $post->ID, 'character_tags','', ', ', '' );?> </span> <?php endif; ?> </div> <br> </div>
The page I need help with: [log in to see the link]
- The topic ‘Post-Meta class preventing tags from centering’ is closed to new replies.