Move Leave A Reply Box Above Comments

Posted in: Newspaper
Post count: 17

Hi, I would like to move the section “Leave A Reply” + comment box + Name + Email + URL + post comment button right above the actual comment listing. Currently, the user has to scroll down to the bottom of the page to leave a comment. So I would like to show the comment box right after the related post but before the actual comment listing.

Please let me know what module do I need to change to achieve this.

Thanks.

Post count: 70

Good one indeed! Especially when redesigned like this to get rid of the ‘wordpressy’look.

Or this

  • This reply was modified 8 years by xbass.
Post count: 70

  • This reply was modified 8 years by xbass.
Post count: 17

Could you share what module needs to be changed for this?

Post count: 20688

Hi,

To move the comments box above the present comments, you will have to edit the theme commnents.php file. Try cutting this line of code from and move it like shown
https://www.screencast.com/t/uEbeqsdvMeTO
https://www.screencast.com/t/kSMBCaHXT
The result should be the comment box above the actual comments
https://www.screencast.com/t/NOCZjrZ9o

Thanks

Post count: 70

update- no only in /apps/themes/Newspaper/comments.php also works on mobile.

  • This reply was modified 8 years by xbass.
Post count: 17

Hi Simion,

Thanks for the reply. The array $defaults is getting initialized below that line of code (comment_form($defaults)).

How will that work? Should we also move all initialization of $defaults array before that line?

Let me know.

Thanks.

Post count: 20688

Hi,

I simply moved the comment form as shown in the screenshot, no other modifications. The comment box will be above the replies. Try it like that and it should work properly.

Thanks

Post count: 3

I tried that, it didn’t work

Post count: 20688

Hi,

@rollinwithmama I tested again as mentioned in the reply above, be sure to modify the code as shown and it will work for you. By default the Leave a reply box is below all the comments, but by making that modification it will be above them
https://www.screencast.com/t/kwo7OTEgoBW

This is the code after the modification
https://pastebin.com/xXX4RtR6

Thanks

Viewing 10 posts - 1 through 10 (of 10 total)
The forum ‘Newspaper’ is closed to new topics and replies.