The effects of alcohol on sustanon 250 leucine for – real weight loss & bodybuilding benefits?
Search
Close
AI Search
Classic Search
 Search Phrase:
 Search Type:
Advanced search options
 Search in Forums:
 Search in date period:

 Sort Search Results by:

AI Assistant
How do add the head...
 
Share:
Notifications
Clear all

[Solved] How do add the header or hide the form

13 Posts
8 Users
3 Reactions
10.3 K Views
Posts: 3
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@larshallen)
Active Member
Joined: 6 years ago
[#24]

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?


12 Replies
Tom
Posts: 512
 Tom
Support
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@tomson)
Honorable Member
Joined: 10 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


1 Reply
(@larshallen)
Joined: 6 years ago

Active Member
Posts: 3
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian

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

 


Tom
Posts: 512
 Tom
Support
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@tomson)
Honorable Member
Joined: 10 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.


Posts: 2
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@kompozitor)
New Member
Joined: 6 years 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


3 Replies
Support
(@zackar)
Joined: 10 years ago

Trusted Member
Posts: 67
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian

Hi @kompozitor.

You can use this code.

add_action('wpdiscuz_comment_form_before', function() {

?>

<h3>Your Custom Title!</h3>

<?php

});

(@inchenaim)
Joined: 6 years ago

Eminent Member
Posts: 16
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian

@zackar

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


Support
(@zackar)
Joined: 10 years ago

Trusted Member
Posts: 67
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian

Hi @inchenaim,

Yes.


Posts: 2
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@kompozitor)
New Member
Joined: 6 years ago

Works perfectly ! thanks !


Posts: 126
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@aerostar)
Estimable Member
Joined: 6 years ago

@zackar,

Thank you. Worked like a charm!

@community,

This is what we did:

(1) Installed the plugin, Code Snippets.

(2) Created the following snippet (snippet setting: front-end only):

add_action('wpdiscuz_comment_form_before', function() {
?>
<p style="margin-top:40px;margin-bottom:40px;text-align:center;font-size:16px;">ALL COMMENTS ARE REVIEWED PRIOR TO POSTING</p>
<?php
});

(3) Result: Click here.


Posts: 2
 Stan
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@stan)
New Member
Joined: 5 years ago

Hi there,

First off, I'm incredibly grateful for WpDiscuz! But I do miss the previous Comment Header. If I remember well, there was a small bubble with the number of comments right on the left of the actual Header and the whole thing just looked neat and pretty. Now it feels that something is missing, at least on my website. Would be amazing if you could bring it back in a future update.

Thanks a lot for the snippets. However, my website is bilingual and I need to have 2 different Comment Headers in English and Greek ( in the previous version of WpDiscuz all I had to do was to translate it in LocoTranslate). Does anyone have any idea how to insert a different snippet for each language?

Thanks a lot!


2 Replies
Asti
 Asti
Support
(@asti)
Joined: 8 years ago

Illustrious Member
Posts: 8210
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian

@stan,

Please follow the steps below: 

1. Put the following code in the active theme functions.php file: 

add_action('wpdiscuz_comment_form_before', function() {
    echo '<h3>' . __('Your Custom Title!' , 'wpdiscuz') .'</h3>';
});

Change the red marked value as you like.

2. Install and activate the Loco Translate plugin (if you don't have it)

3. Go to Dashboard > Loco Translate > Plugins > wpDiscuz tab and click on the "Edit template" button

image

4. Add the custom phrase (e.g. "Your Custom Title!") and save the changes

image

5. Again go to Dashboard > Loco Translate > Plugins > wpDiscuz tab edit the language (Greek)

6. Click on the "Sync" (this step is important, don't miss it)

7. Find and translate the custom phrase (e.g. "Your Custom Title!")


 Stan
(@stan)
Joined: 5 years ago

New Member
Posts: 2
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian

@asti, thank you very much for your very detailed set of instructions, it worked like a charm!


Share: