This topic has 5 replies, 2 voices, and was last updated 8 years by sharmstr.

  • Author
  • #109668
     seyopa
    Participant

    Greetings,

    We would like to move the comment count from the post meta to the post footer. I have already removed the comment count from the post meta by copying the kleo_entry_meta function and commenting out the comments code.

    I tried overriding the post-content-small.php and adding the comment code there, but it’s not showing up. Am I missing something? I used the kleo posts visual block to add the posts to the page.

    Thanks.

     

    #109753
     sharmstr
    Moderator

    There’s no need to override core code to remove the comment count from the meta section. You just need to remove it from Theme Options > Blog > Meta.

    post-content-small.php is for the blog listing. Single blog pages use single.php.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #110171
     seyopa
    Participant

    Perfect. Thank you. I turned off the categories and comments in the post meta. The page I’m working on is actually a blog listing. I figured out that it was post-content-masonry.php I needed to override. I was able to change ‘Read more’ to ‘Show more’ but I still can’t get the comments to show up in the footer. Here’s what I added to the post footer after do_action(‘kleo_post_footer’);:

    //comments
    $meta_list = array();
    $author_links = ”;
    $meta_elements = sq_option( ‘blog_meta_elements’, $kleo_config[‘blog_meta_defaults’] );
    $meta_list[] = ‘<small class=”meta-comment-count”><a href=”‘.
    get_permalink().’#comments”>’.get_comments_number() .
    ‘ <i class=”icon-chat-1 hover-tip” ‘ .
    ‘data-original-title=”‘.sprintf( _n( ‘This article has one comment’, ‘This article has %1$s comments’, get_comments_number(), ‘kleo_framework’ ),number_format_i18n( get_comments_number() ) ).'” ‘ .
    ‘data-toggle=”tooltip” ‘ .
    ‘data-placement=”top”></i>’ .
    ‘</small>’;

    Is there maybe a filter, like after_kleo_post_footer?

    Thanks!

    #110192
     sharmstr
    Moderator

    There’s not. But I dont see that you are echo’ing anything out. You’re assigning the comments to a variable, but you’re not displaying them.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #110273
     seyopa
    Participant

    Hi Sharmstr,

    Thanks for the reply. Sorry – I was tired and had just copied the comment stuff from your post meta code. When I looked at it again today, I realized that I was just appending a post meta array and not doing anything with it. I got it working:

    COPY CODE
    <a href="<?php get_permalink()?>#comments">,
    	<i class="icon-comment-empty" data-original-title="<?php echo sprintf( _n( 'This article has one comment', 'This article has %1$s comments', get_comments_number(), 'kleo_framework' ),number_format_i18n( get_comments_number() ) )?>" data-toggle="tooltip" data-placement="top"></i>
    	<?php
    		echo get_comments_number();
    		echo sprintf( _n( ' comment', ' comments', get_comments_number(), 'kleo_framework' ),number_format_i18n( get_comments_number() ) );
    	?>
    </a>
    #110324
     sharmstr
    Moderator

    No worries. Glad you got it sorted.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

Viewing 6 posts - 1 through 6 (of 6 total)

The forum ‘General questions’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?