[Solved] Changing location of comment form on page  

  RSS

jerick
(@jerick)
Active Member
Joined: 1 week ago
Posts: 5
07/10/2019 3:05 pm  

Hi, is it possible to move the comment form to a higher point on my page. Right now, it's too far down. It's below the related posts, but I would like it right below the current post. Thanks in advance!

This topic was modified 1 week ago by jerick

Elvina
(@elvina)
Trusted Member Moderator
Joined: 1 month ago
Posts: 52
07/10/2019 4:41 pm  

Hi @jerick,

As far as wpDiscuz is being loaded via <?php comments_template() > function, you can change the comment form position by simply relocating the function's position in template files.

More info here: https://developer.wordpress.org/reference/functions/comments_template/


jerick
(@jerick)
Active Member
Joined: 1 week ago
Posts: 5
07/10/2019 7:33 pm  

Hi Elvina, 

thanks for the advice. Just to be sure, do you mean I have to relocate the function in each of the relevant files? So if I have 10 custom post types which I want to move the comment sections in, I will have to do that 10 times? 


jerick
(@jerick)
Active Member
Joined: 1 week ago
Posts: 5
07/10/2019 8:39 pm  

I went to take a look at my theme templates to get a better understanding. It doesnt seem possible to do what I want to in the theme editor, which is to insert the comment form within the content area. The content is output as a whole unit by the "the_content" function. Is there a way to edit the "the_content" function?


Elvina
(@elvina)
Trusted Member Moderator
Joined: 1 month ago
Posts: 52
08/10/2019 1:32 pm  

Hi @jerick,

thanks for the advice. Just to be sure, do you mean I have to relocate the function in each of the relevant files? So if I have 10 custom post types which I want to move the comment sections in, I will have to do that 10 times? 

Yes you should change the position of the <?php comments_template() > function for each custom post type.

 It doesnt seem possible to do what I want to in the theme editor, which is to insert the comment form within the content area. The content is output as a whole unit by the "the_content" function. Is there a way to edit the "the_content" function?

There is no necessary to make changes in the_content function.
If the comment form is visible then the <?php comments_template()> function exsists for sure.

Probably you've imported the template files, thus <? php comments_template ()> was being replaced with <? get_comments()> function or something like that. So you'll need to find the function that is used instead of the comments_template ().

This post was modified 1 week ago by Elvina

jerick
(@jerick)
Active Member
Joined: 1 week ago
Posts: 5
09/10/2019 11:15 am  

@elvina

Thanks so much for your help. While working on the solution, I realized that it's probably  better that my comments section is left at the bottom. But nevertheless, your solution helped me understand the template files better, and may come in handy in future should I change my mind on the comments section Smile Bye for now!


Share:
Green
Default
Pear
Black Emo
{green}:grinning:
{green}:wink:
{green}:face:
{green}:inlove:
{green}:sweaty:
{green}:surprised:
{green}:lovekiss:
{green}:laugh:
{green}:formalsmile:
{green}:displeased:
{green}:cool:
{green}:resent:
{green}:nerd:
{green}:screaming:
{green}:amazed:
{green}:sad:
{green}:deceitful:
{green}:starryeyes:
{green}:evil:
{green}:shocked:
{green}:tears:
{green}:sulky:
{green}:smile:
{green}:vomited:
{green}:hi:
{green}:afraid:
{green}:crazy:
{green}:rabid:
{green}:fighting:
{green}:nonoise:
{green}:blushed:
{green}:idontknow:
{green}:scared:
{green}:razz:
{green}:kiss:
{green}:eat:
{green}:shutmouth:
{green}:gape:
{green}:suspicious:
{green}:laughingoutloud:
{green}:bruise:
{green}:crying:
{green}:pray:
{green}:serious:
{green}:excitement:
:)
:d
:wink:
:mrgreen:
:neutral:
:twisted:
:arrow:
:shock:
:???:
:cool:
:evil:
:oops:
:razz:
:roll:
:cry:
:eek:
:lol:
:mad:
:sad:
:!:
:?:
:idea:
:hmm:
:beg:
:whew:
:chuckle:
:silly:
:envy:
:shutmouth:
{pear}:happy:
{pear}:smile:
{pear}:laugh:
{pear}:laughingoutloud:
{pear}:crying:
{pear}:exhausted:
{pear}:nerd:
{pear}:surprised:
{pear}:veryhungry:
{pear}:wink:
{blackemo}:laughtertotears:
{blackemo}:gift:
{blackemo}:love:
{blackemo}:inlove:
{blackemo}:shamefaced:
{blackemo}:heart:
{blackemo}:crazy:
{blackemo}:anguished:
{blackemo}:bruise:
{blackemo}:easymoney:
{blackemo}:exhausted:
{blackemo}:vampire:
{blackemo}:shutmouth:
{blackemo}:wink:
{blackemo}:carnival:
{blackemo}:flowers:
{blackemo}:hotdrink:
{blackemo}:party: