Site logo

Archived topic

Comment Box Before Comments

16 replies · Started by Jay on June 9, 2021

Viewing posts 1–15 of 17

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 😊

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.

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 🙂

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.

Can you open a new topic for the separate questions?

Thanks :)

Will do, thanks Leo.

Thanks!

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.

Hi David,

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

Thanks!

Hi Jodie,

You can add the PHP snippet to your child theme's functions.php file :)

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!

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.

This archived topic is closed to new replies.