The effects of alcohol on sustanon 250 leucine for – real weight loss & bodybuilding benefits?
Regarding to add cu...
 
Share:
Notifications
Clear all

Question [Solved] Regarding to add custom comment count text

13 Posts
2 Users
0 Likes
467 Views
Posts: 17
Topic starter
(@divyeshk71)
Eminent Member
Joined: 2 years ago

Hello,

I want to add some custom text and comment count above the user reviews. Similar like attachement and added the similar page link.

Would you please let me know if possible.

Thanks.

Topic Tags
12 Replies
Asti
Posts: 7123
 Asti
Support
(@asti)
Illustrious Member
Joined: 6 years ago

Hi divyeshk71,

The attachment is missing so we don't follow you well. Could you please attach the screenshot? It'll allow us better understand what you mean. 

11 Replies
(@divyeshk71)
Joined: 2 years ago

Eminent Member
Posts: 17
Asti
 Asti
Support
(@asti)
Joined: 6 years ago

Illustrious Member
Posts: 7123

@divyeshk71,

Seems that this is an archive page, isn't it? If so, you should edit the template file within the active theme and add the text wherever you want. 

(@divyeshk71)
Joined: 2 years ago

Eminent Member
Posts: 17

@asti We have setup the forum in pages. Like that - https://tradingforbeginner.com/forum/product-forums/etoro-experience-forum/

Would it be possible in pages? If yes then would you provide any hooks example to do so?

Thanks.

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

Illustrious Member
Posts: 7123

@divyeshk71,

You can use the following hook: https://wpdiscuz.com/docs/codex/filters/wpdiscuz_after_comment_author/

(@divyeshk71)
Joined: 2 years ago

Eminent Member
Posts: 17

@asti We have used the above hooks but the custom text added after the author name. It would be possible to add custom text befoew comment header. See attachement to see what i exactly want. 

Thanks.

image
Asti
 Asti
Support
(@asti)
Joined: 6 years ago

Illustrious Member
Posts: 7123

ok @divyeshk71,

Then use this hook code: https://wpdiscuz.com/docs/codex/filters/wpdiscuz_comment_end/

(@divyeshk71)
Joined: 2 years ago

Eminent Member
Posts: 17

@asti This hook code added the custom text after the comment but i want to add before the comment. 😊

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

Illustrious Member
Posts: 7123

@divyeshk71,

The hook works fine. You just need to customize the example code. 

(@divyeshk71)
Joined: 2 years ago

Eminent Member
Posts: 17

@asti What should i change in code to display before the comment? 😉

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

Illustrious Member
Posts: 7123

@divyeshk71,

Here it is:

add_filter("wpdiscuz_comment_end", function ($commentOutput, $comment, $depth, $args) {

    return   '<div>Custom message</div>'. $commentOutput;
}, 10, 4);
(@divyeshk71)
Joined: 2 years ago

Eminent Member
Posts: 17

@asti Thanks. It's works.

Share: