Site logo

Archived topic

I have an inquiry related to text change.

1 reply · Started by Lee on April 1, 2020

Viewing posts 1–2 of 2

So far, we have solved the problem through a number of questions.
Now, if you change some text, the site is complete.

First question
Example site link
I want to change "5 comments" to "댓글 수: 5".
I am wondering how to change the "number position" and "comments" to other text.

Second question
Example site link
How do I replace "svg" in ".nav-previous" and ".nav-next" with text?
I want to change "<" to "다음 글: " and ">" to "이전 글: ".

Third question
Example site link
<input placeholder = "Name *" id = "author" name = "author" type = "text" value = "" size = "30">
<input placeholder = "Email *" id = "email" name = "email" type = "email" value = "" size = "30">
To change each placeholder in
Change placeholder = "Name *" to placeholder = "닉네임",
I want to change placeholder = "Email *" to placeholder = "이메일@".

Hi there,

1. The solution I provided here is how you would do that: https://generatepress.com/forums/topic/i-have-a-few-questions-about-gp-functionality/#post-1219810

2. This might help:

.post-navigation .gp-icon {
    display: none;
}

.nav-previous .prev:before,
.nav-next .next:before {
    display: unset;
    width: unset;
    margin-right: unset;
}

.nav-previous .prev:before {
    content: "Previous: ";
}

.nav-next .next:before {
    content: "Next: ";
}

This should do it:

add_filter( 'comment_form_default_fields', function( $fields ) {
    $commenter = wp_get_current_commenter();

    $fields['author'] = sprintf(
        '<label for="author" class="screen-reader-text">%1$s</label><input placeholder="%1$s *" id="author" name="author" type="text" value="%2$s" size="30" />',
        'YOUR NAME PLACEHOLDER HERE',
        esc_attr( $commenter['comment_author'] )
    );

    $fields['email'] = sprintf(
        '<label for="email" class="screen-reader-text">%1$s</label><input placeholder="%1$s *" id="email" name="email" type="email" value="%2$s" size="30" />',
        'YOUR EMAIL PLACEHOLDER HERE',
        esc_attr( $commenter['comment_author_email'] )
    );

    $fields['url'] = sprintf(
        '<label for="url" class="screen-reader-text">%1$s</label><input placeholder="%1$s" id="url" name="url" type="url" value="%2$s" size="30" />',
        'YOUR URL PLACEHOLDER HERE',
        esc_attr( $commenter['comment_author_url'] )
    );

    return $fields;
}, 20 );
This archived topic is closed to new replies.