Home / admin / Give author capabilities including editing other authors posts
  • How to Give author capabilities including editing other authors posts

    give-author-capabilities-including-editing-other-authors-posts

    Adding this snippet to the functions.php of your wordpress theme will allow authors to edit other users posts.

    This is a list of other capabilities that can be used. Adding more than one cap just add a new line $role->add_cap( 'new_cap_name' ); Thanks to Andrea Bersi for submitting.

    wordpress snippet : PHP

    <>
    function add_theme_caps() {
       $role = get_role( 'author' );
       $role->add_cap( 'edit_others_posts' ); 
    }
    add_action( 'admin_init', 'add_theme_caps');
    

    ( WordPress codex functions, hooks, in this snippet. )

    init, add_cap, get_role, add_action, _n,
  • Abhishek

    Nice one! Thanks!