Site logo

[Resolved] Comment Box Before Comments

Home Forums Support [Resolved] Comment Box Before Comments

Home Forums Support Comment Box Before Comments

Viewing 15 posts - 1 through 15 (of 17 total)
  • Author
    Posts
  • #1816571
    Jay

    Hi, I’ve been trying to move the comment box BEFORE the comments and came across these instructions https://generatepress.com/forums/topic/comment-form-2/#post-692006

    I created a child theme but I’m still not certain how to proceed.

    Do I simply copy and paste the code from https://gist.github.com/generatepress/9a0f6cf705cd594ab22296c6a8e8de3f into the Functions.php editor of the Child Theme?

    Those instructions are from a few years ago as well, so also wondering if there have been any updates to make this easier.

    Thank you ๐Ÿ˜Š

    #1816577
    Leo
    Staff
    Customer Support

    Hi Jay,

    Follow the instruction here:
    https://docs.generatepress.com/article/move-the-comment-form-above-comments/

    Let me know if this helps ๐Ÿ™‚

    #1816590
    Jay

    Thanks Leo. That’s kind of the part I’m stuck on. The instructions say “download”. Am I actually downloading it from somewhere or just “copying” the code that’s there?

    I know… it’s probably a dumb question, lol.

    The second part I’m not certain of is the Child Theme’s “Folder”. Is that the functions.php field?

    When I go into the Theme Editor I have two fields… style.css and functions.php. Do I need to create a third field called comments.php or do I just paste the comments.php code into the functions.php field?

    Thanks again for your help with this.

    #1816595
    Leo
    Staff
    Customer Support

    Ahh I see.

    So click the link here:
    https://www.screencast.com/t/bHRJma7g1

    Which takes you to this page:
    https://gist.github.com/generatepress/9a0f6cf705cd594ab22296c6a8e8de3f#file-comments-php

    Then click Download zip:
    https://www.screencast.com/t/VSMpQgVl3jyn

    Unzip the downloaded file and there is a comments.php file in there.

    Put that file in the child theme’s folder along side of style.css and function.php.

    That should do it.

    Let me know ๐Ÿ™‚

    #1816609
    Jay

    Thanks Leo, that helps a lot. I’m working on my staging site at the moment and will check with my host if I have FTP access ๐Ÿ™‚

    #1816633
    Jay

    Awesome, got it to work, thank you…

    Now I have another related question, lol.

    Where it says “Leave a Comment”, I was able to add a disclaimer in that box. Is there a way of doing that with Generatepress?

    Sorry for all the questions.

    #1816739
    Leo
    Staff
    Customer Support

    Can you open a new topic for the separate questions?

    Thanks ๐Ÿ™‚

    #1819102
    Jay

    Will do, thanks Leo.

    #1819138
    Leo
    Staff
    Customer Support

    Thanks!

    #1994411
    Jodie

    Hi Leo,

    I’m trying to do the same with my site. Where can I find the function code to copy and paste into the functions.php file of my child theme? Thanks very much.

    #1994692
    David
    Staff
    Customer Support

    Hi there,

    Code can be found here:

    https://gist.github.com/generatepress/9a0f6cf705cd594ab22296c6a8e8de3f

    Click download Zip – uncompress it so you have the comments.php file. Place that file in Child Theme directory.

    #1995179
    Jodie

    Hi David,

    Thank you! How do I place it in the child theme once I have the raw PHP file ready to upload?

    Thanks!

    #1995183
    Ying
    Staff
    Customer Support

    Hi Jodie,

    You can add the PHP snippet to your child theme’s functions.php file ๐Ÿ™‚

    #1995192
    Jodie

    Hi Ying,

    I tried copying the code and pasting it into the functions.php file but I get this message.

    Your PHP code changes were rolled back due to an error on line 53 of file wp-content/themes/generatepress_child/functions.php. Please fix and try saving again.

    What am I doing wrong? Thanks!

    #1995206
    Ying
    Staff
    Customer Support

    Oops.. I’m sorry, I didn’t misread David’s message.

    The link he provided is the comments.php file, it’s not supposed to be copy and paste in the functions.php.

    Click download Zip โ€“ uncompress it so you have the comments.php file. Place that file in Child Theme directory.

    This is what you should do ๐Ÿ™‚ Put it in your child theme folder.

Viewing 15 posts - 1 through 15 (of 17 total)
  • You must be logged in to reply to this topic.