wpDiscuz - WordPress Comment Plugin
Share:
Notifications
Clear all

Question [Solved] Comment policy

9 Posts
2 Users
0 Likes
181 Views
Posts: 8
Topic starter
(@taxick)
Active Member
Joined: 5 months ago

Hi,

I have a new site called https://www.futurenode.dk πŸ™‚ and I use wpDiscuz

I have also bought "Addons Basic Bundle"

Now to my question. Is there an easy way to add a "Comment policy link" before the comment field?

2023 05 23 15 21 31

Thanks

Thomas

8 Replies
Asti
Posts: 6603
 Asti
Support
(@asti)
Illustrious Member
Joined: 6 years ago

Hi Thomas,

You can use the wpdiscuz_comment_form_before hook. More info here:Β  https://wpdiscuz.com/docs/codex/actions/wpdiscuz_comment_form_before/

Posts: 8
Topic starter
(@taxick)
Active Member
Joined: 5 months ago

Hi @Asti πŸ™‚

Thanks for your reply. Maybe a stupid question, but where will I need to add the code?

1 Reply
Asti
 Asti
Support
(@asti)
Joined: 6 years ago

Illustrious Member
Posts: 6603

@taxick,

Please put the code using the methods provided in this article: https://www.wpbeginner.com/plugins/how-to-easily-add-custom-code-in-wordpress-without-breaking-your-site/

Posts: 8
Topic starter
(@taxick)
Active Member
Joined: 5 months ago

Hi @Asti

Thanks. I will loke into this in a weak or to

Posts: 8
Topic starter
(@taxick)
Active Member
Joined: 5 months ago

Hi @Asti

I have a problem with my code.

I have installed this code in WPcode, and it appears on the correct pages...

Test page:Β  https://www.futurenode.dk/dice-veteraner-samles/ (Right over the comment field)

But the link is not clickable. Right now my code looks like this:

add_action("wpdiscuz_comment_form_before", function () {
    echo "<div style='text-align:center'>";
    echo "Husk at fΓΈlge vores: <a  https://www.futurenode.dk/retningslinjer-for-kommentarer/>Retningslinjer  for kommentarer</a>";
});

I want to make link that opens in a new page

Can you help me?

BTW... My PHP and html skill is very limited

Regards

Thomas

Posts: 8
Topic starter
(@taxick)
Active Member
Joined: 5 months ago

edit to my post above.

I want to make a link that is clickable and opens on a new page.

2023 05 25 19 59 14
1 Reply
Asti
 Asti
Support
(@asti)
Joined: 6 years ago

Illustrious Member
Posts: 6603

@taxick,

You've forgotten to add the link in the href attribute. The right code is provided below:

add_action("wpdiscuz_comment_form_before", function () {
    echo "<div style='text-align:center'>";
    echo "Husk at fΓΈlge vores: <a href='https://www.futurenode.dk/retningslinjer-for-kommentarer'>Retningslinjer for kommentarer</a>";
});Β 

Β 

Posts: 8
Topic starter
(@taxick)
Active Member
Joined: 5 months ago

Ahh. Thanks a lot. You can close the post πŸ™‚

Share: