Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi Camille,

    Thank you for getting in touch with us.

    The only way to change it is by theme customization. Please open kale/parts/entry.php file and find these lines:

    if ( ! post_password_required() && comments_open() && $kale_blog_feed_comments_show == 1)  
        $kale_temp[] = '<div class="entry-comments"><a href="'.get_comments_link().'">'. sprintf( _nx( '1 Comment', '%1$s Comments', get_comments_number(), 'comments title', 'kale' ), number_format_i18n( get_comments_number() ) ) .'</a></div>';

    and replace it with this:

    if ( ! post_password_required() && comments_open() && $kale_blog_feed_comments_show == 1) {
        $num_of_comments = (int) get_comments_number();
        $comment = '<div class="entry-comments"><a href="'.get_comments_link().'">';
        switch ($num_of_comments) {
            case $num_of_comments === 1: // 1 comment
                $comment .= sprintf( __( '%1$s Comment', 'kale' ), $num_of_comments );
                break;
    	case  $num_of_comments > 1: // more than 1 comment
    	    $comment .= sprintf( __( '%1$s Comments', 'kale' ), $num_of_comments );
    	    break;
    	default: // 0 comment
    	    $comment .= sprintf( __( '%1$s Comment', 'kale' ), $num_of_comments );
    	    break;
        }
        $comment .= '</a></div>';
        $kale_temp[] = $comment;
    }

    Please change your text as you wish.
    Please note also that these changes will be removed after next theme update so the best way would be to add them to Child Theme.

    Hope that helps.

    Thank you for your time in this.

    Best regards

    • This reply was modified 8 years, 7 months ago by jarektheme.
    • This reply was modified 8 years, 7 months ago by jarektheme.
    Thread Starter camillepatisserie

    (@camillepatisserie)

    Hello,

    Thanks for your answer. It took me time to test it but I did. I created a child theme with your change and it’s… half-working.

    As you can see at http://www.camille-patisserie.com it works on featured articles but I hadn’t be able to translate it in french and it doesn’t work on the slider (but it still in French).

    I did try to translate it on the code you gave me, but I guess I missed something somewhere…

    if ( ! post_password_required() && comments_open() && $kale_blog_feed_comments_show == 1) {
                    $num_of_comments = (int) get_comments_number();
                    $comment = '<div class="entry-comments"><a href="'.get_comments_link().'">';
                    switch ($num_of_comments) {
                        case $num_of_comments === 1: // 1 commentaire
                            $comment .= sprintf( __( '%1$s Commentaire', 'kale' ), $num_of_comments );
                            break;
                    case  $num_of_comments > 1: // more than 1 comment
                        $comment .= sprintf( __( '%1$s Commentaires', 'kale' ), $num_of_comments );
                        break;
                    default: // 0 comment
                        $comment .= sprintf( __( '%1$s Commentaire', 'kale' ), $num_of_comments );
                        break;
                    }
                    $comment .= '</a></div>';
                    $kale_temp[] = $comment;
                }
    

    Thanks for your help,

    Camille

    Hi Camille,

    The comments in slider need more changes in parts/frontpage-banner.php file.

    In order to translate comments you need one of the plugin translation like Loco translate: https://ww.wp.xz.cn/plugins/loco-translate/ or Poedit App: https://poedit.net/

    Please, contact us via our support system here: https://www.lyrathemes.com/support/. We are not allowed to ask for your site’s details here, which would let us help you out.

    We’ll try to resolve it as soon as possible.

    Best

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘0 comment”s”’ is closed to new replies.