wpDiscuz - WordPress Comment Plugin
Share:
Notifications
Clear all

How do add the header or hide the form  


larshallen
Posts: 3
(@larshallen)
New Member
Joined: 9 months ago

Is it possible to add a header (title) for the comment-section and/or hide the commenting form and show comments first hand with a "leave a reply..."-button that will show the form?

8 Replies
Tom
Posts: 404
 Tom
Support
(@tomson)
Support Team
Joined: 5 years ago

Hi @larshallen,

You can add any header, text or HTML code before the comment form using this action hook:

https://wpdiscuz.com/docs/codex/actions/wpdiscuz_comment_form_before/

Using WordPress action hooks: https://www.google.com/search?q=how+to+use+action+hooks+in+wordpress

Reply
1 Reply
larshallen
(@larshallen)
Joined: 9 months ago

New Member
Posts: 3

Thanks @tomson for your swift reply

I haven’t discovered action hook yet, I guess now was the time. This is moving my use of Wordpress to a new level. Can I ask you, is it with action hooks that I move the comment form to the end of the comments area instead of where it is by default, which is the beginning? Another way of putting this question:

Is there a simple and straightforward way to move the form to the end instead of the beginning, where it is now? And if there is such a way I would love to have a written walkthrough by someone whom have done that before me. It seems it could be a thing that someone have tried to do before me.

Thank you

Lars

 

Reply
Tom
Posts: 404
 Tom
Support
(@tomson)
Support Team
Joined: 5 years ago
Posted by: @larshallen

Is there a simple and straightforward way to move the form to the end instead of the beginning, where it is now? And if there is such a way I would love to have a written walkthrough by someone whom have done that before me. It seems it could be a thing that someone have tried to do before me.

I'm really sorry but this is impossible. wpDiscuz has no chance to work with a comment form located at the bottom.

Reply
Kompozitor
Posts: 2
(@kompozitor)
New Member
Joined: 6 months ago

Hi, I am interested in displaying a Title as well.

I don't understand how this "hook" thing works, it's too technical.

Could the Wpdiscuz team provide an example ?

Thanks a lot

Reply
3 Replies
Zackar
Support
(@zackar)
Joined: 5 years ago

Support Team
Posts: 7

Hi @kompozitor.

You can use this code.

add_action('wpdiscuz_comment_form_before', function() {

?>

<h3>Your Custom Title!</h3>

<?php

});
Reply
inchenaim
(@inchenaim)
Joined: 6 months ago

New Member
Posts: 4

@zackar

Hello, this snippet should i put in theme's function.php?

Reply
Zackar
Support
(@zackar)
Joined: 5 years ago

Support Team
Posts: 7
Kompozitor
Posts: 2
(@kompozitor)
New Member
Joined: 6 months ago

Works perfectly ! thanks !

Reply
Share: