helios
asked 9 years ago

I’m trying to change position of comment counter in WallClassic template, but cannot do that so far. With the help of style.css and padding tweaks in .item-meta .comments-link parameter only comment icon changes position, not the counter number itself. Ideally, I would like to place comment counter (and icon, perhaps) in one row with category name (no author), something like: Videos | [icon] 15 or Music • [icon] 17 . But at least removing extra white space between post title, category name and comment counter would do as well, because posts without intro texts don’t look so nice there right now.
Comments are integrated with Disqus, but I think that shouldn’t be a big issue, as it’s probably related to the theme structure.
Could you help please?

3 Answers
Wilfred
answered 9 years ago

Hi Helios.

To place comment in one row with category name, please  follow my instruction here:
– Go content.php in your site > wp-content > themes > your theme > content.php.
– Replace following code – line 46 -60:

 <div class="item-meta meta-top clearfix">
<span class="item-author">
<?php _e( 'By', 'wallclassic' );?>
<?php the_author_posts_link(); ?>
</span>
<?php
$categories_list = get_the_category_list( __( ', ', 'wallclassic' ) );
if ( $categories_list ):
?>
<span class="item-category">
<?php printf( __( '<span class="%1$s">in</span> %2$s', 'wallclassic' ), 'entry-utility-prep entry-utility-prep-cat-links', $categories_list );
$show_sep = true; ?>
</span>
<?php endif; ?>
</div>

By

 <div class="item-meta meta-top clearfix">
<?php
$categories_list = get_the_category_list( __( ', ', 'wallclassic' ) );
if ( $categories_list ):
?>
<span class="item-category">
<?php printf( __( '<span class="%1$s"></span> %2$s', 'wallclassic' ), 'entry-utility-prep entry-utility-prep-cat-links', $categories_list );
$show_sep = true; ?>
</span>
<?php endif; ?>
<span>&bull;</span>
<span class="comments-link">
<?php comments_popup_link( '<span class="leave-reply">' . __( '0 comment', 'wallclassic' ) . '</span>', __( '1 comment', 'wallclassic' ), __( '% comments', 'wallclassic' ) ); ?>
</span>
</div>

– Replace following code – line 72 -80

 <div class="item-meta meta-bottom clear">
<span class="comments-link">
<?php comments_popup_link( '<span class="leave-reply">' . __( '0 comment', 'wallclassic' ) . '</span>', __( '1 comment', 'wallclassic' ), __( '% comments', 'wallclassic' ) ); ?>
</span>

<span class="item-permalink">
<a title="<?php the_title(); ?>" href="<?php echo get_permalink(); ?>"><?php _e( 'More', 'wallclassic' ); ?></a>
</span>
</div>

by

 <div class="item-meta meta-bottom clear" style="overflow: hidden">
<span class="item-permalink">
<a style="display: block;" title="<?php the_title(); ?>" href="<?php echo get_permalink(); ?>"><?php _e( 'More', 'wallclassic' ); ?></a>
</span>
</div>

Hope this helps!

helios
replied 9 years ago

Thank you for excellent answer, Wilfred! This really helped.

helios
answered 9 years ago

Could you also please tell where to change bottom padding setting in order to remove extra white space below post’s intro text? Considering there is no “More” link in the (right bottom corner of) posts. It would be great for posts to have the same bottom padding from the Category/Comments line or intro text just like top padding above post’s title or featured thumbnail image.
Here’s what I mean:

DominicStaff
answered 9 years ago

To change bottom padding of the posts in the site. You can log in to Dashboard > Theme > Custom Code > Header code then add the following code:

<style>
.item .item-inner {
     padding: 6px 20px;
}
</style>
Powered by DW Question & Answer Pro