Skip to:
Content
Pages
Categories
Search
Top
Bottom

code to restrict activity feed commenting by role


  • beachcalsix
    Participant

    @beachcalsix

    Hi, I already found a code to restrict post commenting based on WordPress roles. I am now trying to find a code to restrict commenting on the BuddyPress activity feed.

    My site has paid member roles and one role is the default role for free members that sign up. Then there are just guests with no role at all.

    I would like a code that will restrict free members to be restricted from commenting in the activity feed. I already have a PHP code in functions that keeps them from commenting on posts. I only want commenting to be allowed in paid member roles. Guests and free users blocked.

    Is there a code I can use for this?

    Thanks in advance!

Viewing 2 replies - 1 through 2 (of 2 total)

  • vasudevb
    Participant

    @vasudevb

    Hi,

    Could you find anything? Some help will be quite valuable

    Thanks


    beachcalsix
    Participant

    @beachcalsix

    @vasudevb, I never received a response here.
    However, I did find this post on buddydev.com
    They don’t explain the code very well, I wanted all users to be able to view the posts but only a certain role to be able to comment. But this code doesn’t use roles. If I was better at coding, I would just create something myself or tweak this code. If anyone here could explain it further, I’d be very grateful. But I’ll probably post on buddydev as well. Otherwise, I’ll just settle with blocking the entire page by role as I’m currently doing.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Skip to toolbar