wpDiscuz - WordPress Comment Plugin
Share:
Notifications
Clear all

Suspending voting on certain comments or individual posts?


Sophie
Posts: 12
Topic starter
(@sophie)
Active Member
Joined: 1 year ago

This isn't really an issue, more of a plea.

Can you please find a way to enable voting to be suspended on certain comments or on certain articles?

You guys have been awesome in providing extra functionality on demand  in the past, so I'm hoping you can also pull this off!

it would make a huge improvement to this admin's working life! 

 

 

 

Topic Tags
3 Replies
Asti
Posts: 3556
 Asti
Support
(@asti)
Support member
Joined: 4 years ago

 Hi Sophie,

You can use the following hook-code:

add_filter("wpdiscuz_comment_list_args", function ($args) {
    if (in_array($args["post_id"], [X,])) {
        $args["components"]["vote.html"] = "";
    }
    return $args;
});

Just replace the red marked value with the comma-separated post IDs where you want to hide voting buttons. 

The code should be put in the active theme functions.php file. 

 

Reply
2 Replies
Sophie
(@sophie)
Joined: 1 year ago

Active Member
Posts: 12

@asti thanks that's a great help!

This will disable votes of comments in specified posts, right? is there a way to do it for specific posters - eg to disallow votes on admin comments? 

Reply
Asti
 Asti
Support
(@asti)
Joined: 4 years ago

Support member
Posts: 3556

@sophie,

I'm really sorry, but there isn't an easy solution we can post here. 

Currently, we have plugin customization and custom addon development services at the gVectors Team. They can assess the work and create it for you. Just contact us via sales[at]gvectors.com email address and send a list of requirements you'd like to have.

Reply
Share: