- This topic has 16 replies, 6 voices, and was last updated 4 years, 4 months ago by
Elvin.
-
AuthorPosts
-
June 9, 2021 at 11:05 am #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 ๐
June 9, 2021 at 11:13 am #1816577Leo
StaffCustomer SupportHi Jay,
Follow the instruction here:
https://docs.generatepress.com/article/move-the-comment-form-above-comments/Let me know if this helps ๐
June 9, 2021 at 11:25 am #1816590Jay
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.
June 9, 2021 at 11:31 am #1816595Leo
StaffCustomer SupportAhh I see.
So click the link here:
https://www.screencast.com/t/bHRJma7g1Which takes you to this page:
https://gist.github.com/generatepress/9a0f6cf705cd594ab22296c6a8e8de3f#file-comments-phpThen click Download zip:
https://www.screencast.com/t/VSMpQgVl3jynUnzip the downloaded file and there is a
comments.phpfile in there.Put that file in the child theme’s folder along side of
style.cssandfunction.php.That should do it.
Let me know ๐
June 9, 2021 at 11:41 am #1816609Jay
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 ๐
June 9, 2021 at 12:04 pm #1816633Jay
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.
June 9, 2021 at 2:44 pm #1816739Leo
StaffCustomer SupportCan you open a new topic for the separate questions?
Thanks ๐
June 11, 2021 at 12:06 pm #1819102Jay
Will do, thanks Leo.
June 11, 2021 at 12:54 pm #1819138Leo
StaffCustomer SupportThanks!
November 6, 2021 at 9:24 pm #1994411Jodie
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.
November 7, 2021 at 7:25 am #1994692David
StaffCustomer SupportHi there,
Code can be found here:
https://gist.github.com/generatepress/9a0f6cf705cd594ab22296c6a8e8de3f
Click download Zip – uncompress it so you have the
comments.phpfile. Place that file in Child Theme directory.November 7, 2021 at 2:53 pm #1995179Jodie
Hi David,
Thank you! How do I place it in the child theme once I have the raw PHP file ready to upload?
Thanks!
November 7, 2021 at 2:59 pm #1995183Ying
StaffCustomer SupportHi Jodie,
You can add the PHP snippet to your child theme’s
functions.phpfile ๐November 7, 2021 at 3:04 pm #1995192Jodie
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!
November 7, 2021 at 3:27 pm #1995206Ying
StaffCustomer SupportOops.. I’m sorry, I didn’t misread David’s message.
The link he provided is the
comments.phpfile, it’s not supposed to be copy and paste in thefunctions.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.
-
AuthorPosts
- You must be logged in to reply to this topic.