Support » Fixing WordPress » A plugin that can limit the number of comments per post?

  • OK, so here the thing. I’m trying to setup a WP store with products from Aliexpress. All works fine, except that the plugin I’m using to do this does not have a limit for the comments (ie Aliexpress product reviews imported as comments).

    I’ve no idea when/if the plugin developer will improve it to do what I need, so… I’m searching for alternatives to stop this plugin from publishing so many comments per product. I think at most 30-40 comments should be enough.

    In conclusion, is there any way, plugin, function code, magic that can do either of the following (or both)?

    – restrict the comments per post so that the Aliexpress importer will not publish more than the number of comments I want
    – close comments for older posts, such as 1-2-3 days etc? I know WP should do this already, but somehow my Ali plugin goes around it and still imports hundreds of comments/post. Or maybe it does it because these are custom posts, not regular WP posts (?!)

    Of course, any other idea/solution is welcomed.

    Thank you in advance.

Viewing 4 replies - 1 through 4 (of 4 total)
  • PS Just to make sure I’ve made myself understood. I don’t want to limit the number of comments displayed on a custom post. I want to restrict the number of comments ALLOWED per post. Meaning that:
    – the comments should display on the page
    – commenting should be allowed
    BUT
    – as soon as there are 30 comments per custom post, no more would be allowed to be published. While the existing comments will still show on posts.
    Alternately, I was also thinking of a php script to run as a cronjob to just delete the comments exceeding 30 per post, but I have no knowledge to do it myself and couldn’t find anything on the net.
    Again,any idea is welcomed.

    Moderator t-p

    (@t-p)

    See if this plugin can work for your need:
    https://wordpress.org/plugins/limit-comments-and-word-count/

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    Moved to Fixing WordPress, this topic isn’t for Everything else WordPress.

    • This reply was modified 11 months, 2 weeks ago by  Jan Dembowski.

    @t-p Thanks. Unfortunately, it didn’t help. I’ve set the limit the 20/day and run the comments importer. Soon after, some posts/products already had more than 40 comments imported.
    But I’m not sure a plugin like this will work, because the comments are also imported by a plugin and it seems that it doesn’t care about the Comments settings at all.
    And to make things worse, the comments imported itself starts with the oldest WP post, so every time I run it will add more comments to posts that already have too many 🙁

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘A plugin that can limit the number of comments per post?’ is closed to new replies.