[Resolved] comment form

Home Forums Support [Resolved] comment form

Home Forums Support comment form

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #691545
    dassana

    there are some changes i want to make in the comment form:

    1. in the comment title the text – “no of” thoughts on ‘recipe title’ comes on all posts. i just want to add “no of” comments and reviews instead of the long recipe title.

    2. the comment form should appear above the comments and not below the comments.

    3. the line ‘your email is not shared’ is not there. i want this line to be added.

    4. i also want to write a short snippet on comment policy in the comment form itself after the recipe rating tab.

    5. instead of ‘leave a comment’ is it possible to write something else like ‘leave a comment or review’ or ‘did you try this recipe’ or ‘review this recipe’ etc.

    do let me know how to implement these changes.

    for now i an using these css codes for the comment form:

    .comments-area input#url {
    display: none;
    }

    .comment-form #author, .comment-form #email {
    display: inline-block;
    }

    .comment-form {
    border: double #e5e5e5;
    padding: 20px 20px 30px 20px;
    }

    .comment-form #email {
    float: right;
    }

    GeneratePress 2.1.4
    GP Premium 1.7.2
    #692006
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    1. I’m not too sure what you mean by this. Can you explain a bit more?

    2. You’d have to download this file as comments.php and add it to your child theme: https://gist.github.com/generatepress/9a0f6cf705cd594ab22296c6a8e8de3f

    3. The function in #1 adds this.

    4. Try this:

    add_action( 'comment_form_after_fields', function() {
        ?>
            <p>Your message here.</p>
        <?php
    } );

    5. Try this:

    add_filter( 'generate_leave_comment', function() {
        return 'Review this recipe';
    } );
    #692450
    dassana

    thanks tom. i did install child theme and made the comment changes. but the child theme breaks my site. so uninstalled it and reverted back to generatepress.

    i added the codes you gave in the snippets plugin. worked well, but i need to make some css changes. you can check this url – https://www.vegrecipesofindia.com/eggless-butter-cake-recipe/#comments

    the words “Review or Leave a comment. If you have made the recipe, then you can give a star rating too. All comments are moderated before they appear on the website. We thank you for waiting.” are all h4. i only want the review or leave a comment h4 and the rest of the words in normal text. also how to create space between the two lines like there are between paragraphs.

    the number one point you did not understand is that the starting of comment section when there are comments being with eg -8 thoughts on “butter cake recipe – how to make soft butter cake without eggs”

    i just want to show 8 comments or reviews. thats it.
    is this possible without using the child theme as it breaks my site.

    #692909
    Tom
    Lead Developer
    Lead Developer

    What about it broke your site? Any specific error messages?

    I don’t believe a hook exists for right after your title for that message. You could try this maybe:

    add_action( 'comment_form_top', function() {
        ?>
            Your long message after title.
        <?php
    } );

    Right now it’s not very easy to change that title, but it will be easier in 2.2: https://generatepress.com/forums/topic/change-comment-text-and-create-anchor-link-to-leave-a-comment/#post-664590

    #693250
    dassana

    will wait. i again enabled child theme today. the site errors were due to cache plugin. i have added these codes in the code snippets plugin. should i let them be there or add the above codes to the comments.php file.

    #693488
    Tom
    Lead Developer
    Lead Developer

    The standalone functions can go in Code Snippets or your child theme functions.php file.

    The comments.php file is separate from the functions.

    #693499
    dassana

    thanks tom for the clarification.

    #693767
    Tom
    Lead Developer
    Lead Developer
Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.