This topic has 9 replies, 3 voices, and was last updated 7 years by Radu.

  • Author
  • #106319
     etwark
    Participant

    Hi guy i write here because after time i couldn’t find out how to change the labels on the comment form, if i add an array section in the comment.php of standard template the comment form change but in kleo not.

     

    How i can solve this issue..?

     

    Thank.

    #106334
     Radu
    Moderator

    You can do that by using loco translate plugin https://wordpress.org/plugins/loco-translate/

    You will need to go to the plugin dashboard and in kleo section add new language, choose your language, and if you are asked where you want to save the language files choose global language directory ( wp-content/languages/ ) then search for that string and translate it.

    That’s all

    Cheers

    Radu

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

    Sorry but i don’t need to change in another language but i need to change the “leave a replay” to Leave a comment

    Where i find the code the function..?

    I tried with a default template of wordpress under contact_form() and worked..but with kleo no

    Thanks

    #107411
     Radu
    Moderator

    Hi,

    Add this code to wp-content/themes/kleo-child/functions.php

    COPY CODE
    
    if (!function_exists('kleo_comment_form')) :
    
        function kleo_comment_form( $args = array(), $post_id = null ) {
    
                $comments_args = array(
                    'title_reply'          => __( 'Leave a comment', 'kleo_framework' ),
                    'title_reply_to'       => __( 'Leave a comment to %s', 'kleo_framework' ),
                    );
    
                comment_form($comments_args);
        }
    
    endif;
    

    Let me know

    Cheers

    Radu

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

    With the code enabled the text box became like this

    Attachments:
    You must be logged in to view attached files.
    #109084
     Radu
    Moderator

    Hi again,

    If you will have more strings to rename i suggest you to use loco translate, not for translating to another language just to rename/adjust your string names, go to loco translate add same language as your language, and when you are asked where you want to save lang files choose global language directory ( wp-content/languages/ ) in this way you will be able to search for strings and rename it. If you will use this option (loco translate) remove the function that i have provided to you

    Cheers

    Radu

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

    it looks like the code above strips out this div:

    which wraps this div

    and has the padding and margin for the bottom of the button.

    how do we add that div back into the comment form? or can we just ass css?

    #153887
     Radu
    Moderator

    What div wraps ?! what do you mean the button should be on the right side?

    Q: how do we add that div back into the comment form? or can we just ass CSS?
    R: The function removes the div? the function doesn’t write any div, as you can see in function content.

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

    Sorry, the comment field did not accept my HTML code – didn’t realize there was a “code” tag

    When I implemented the function above, for some reason, it removes the div with the ID respond-wrap:
    <div id="respond-wrap">

    Which wraps the div with the id respond and class of comment-respond:
    <div id="respond" class="comment-respond">

    When the respond-wrap div is removed, the comment button hits the top of the footer section as demonstrated by
    etwark’s image. There is no spacing below the button. In addition, the comment textarea field is only half the width.

    When I remove the code from above, the comment field returns to it’s proper padding and width.

    Attachments:
    You must be logged in to view attached files.
    #154614
     Radu
    Moderator

    Hi

    Wordpress allow by default only few elements like a b i if you need other elements to be allowed follow this link : http://wordpress.stackexchange.com/questions/17947/expanding-the-allowed-html-tags-in-comments

    Cheers
    R

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
Viewing 10 posts - 1 through 10 (of 10 total)

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

Log in with your credentials

Forgot your details?