WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: Post from site] can't write post if I have limited capabilities (2 posts)

  1. ElaineMarley86
    Member
    Posted 1 year ago #

    I'm using plugin "Post from site".
    Every post written from the front end is not a standard post, but a special post type (I called it "project").
    I want to allow just a special type of users (a new type I called "Students") to use it. students can't write standard posts, but just "project" type of posts.

    The problem is: when a Student goes to the front-end editor reads "You must be logged in to post." and doesn't see the editor. I think that's because in the plugin code there is this line

    if (current_user_can('publish_posts') || $options['allow_anon']){

    so I changed the line (every time it appears in the code) into this

    if (current_user_can('publish_project') || $options['allow_anon']){

    but it simply doesn't work (and I'm 100% sure the student has "publish_project" capability). Is there some other change I must do in order to allow Students to write from front end?
    Thanks everyone!

  2. combobreakerDOTcom
    Member
    Posted 1 year ago #

    I was having this same issue and replacing 'publish_posts' with 'read' in the three instances of the plugin seems to fix the issue. Not sure if this affects anything else, but so far it seems to resolve the issue.

Topic Closed

This topic has been closed to new replies.

About this Topic