Hook for comments on custom post_type.

front page Forums How-to Questions Hook for comments on custom post_type.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • #32798


    • I have a small review website with reviewable items in custom post_type = review.
    • Reviews are saved as comments (with additional meta).

    I want to award users badges based for 1 x review, 5x review, 10x review, etc. I can do this via the ‘approved comment’ hook, however that obviously also captures comments on news posts, which could mean people get the ’10x review’ badge for writing ten comments on our blog.

    I’d like to add a separate hook that awards points for comments – but only on specific post_type ‘review’. I thought I could copy the comments hook and rename it, add ‘post_type’ = ‘review’ and job done, but I’m having trouble.

    Could anyone steer me in the right direction?


    You are overdoing it. 🙂

    If you are interested in hiring a freelance dev for a quick help, you can reach me through the Contact Developer button at the right side of my profile.

    Have a nice day.
    Cordially, M.


    If you are interested in hiring a freelance dev for a quick help

    I’m not, I’m in the how to questions forum asking a how to question.


    No problem Sir, please take it easy.

    If you actually posted some code and made some mistakes, I would have gladly helped you freely as long as it’s quick and easy to fix. But since you did not and you are not receiving any help from anybody else, I thought I would help you save time and trouble against a small and reasonable amount. Anyway, you could have just said “No, thanks.” and it would have been fine, there is no need to use that tone.

    That said, I still wish you a nice day and good luck on your endeavors.

    Cordially, M.


    Hi tppp – i had a similar situation, where i want to allow points for reviews (comments on post type A) but not for comments on blog posts. Did you find a solution, and can you share any pointers?
    Also, anyway to exlclude comments on reviews from earning points?

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.