1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Auto publish wordpress posts insead of pending review status

Discussion in 'WordPress' started by vicky1408, Sep 16, 2010.

  1. #1
    Hi,

    when a contributor post something to my wordpress site,I want it to be published automatically,instead of pending review status.I want to know is there any plugin or any simple customisation.
     
    vicky1408, Sep 16, 2010 IP
  2. s_ruben

    s_ruben Active Member

    Messages:
    735
    Likes Received:
    26
    Best Answers:
    1
    Trophy Points:
    78
    #2
    Open the function.php file from the activated theme directory and add this code there:

    
    function add_role_caps() {
        global $wp_roles;
        $role = get_role('contributor');
        $role->add_cap('publish_posts');
    };
    add_action ('admin_head','add_role_caps');
    
    PHP:
    After it the contributors can publish their posts.
     
    s_ruben, Sep 16, 2010 IP
  3. bob25

    bob25 Well-Known Member

    Messages:
    1,519
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    128
    #3
    I haven't tried itbefore, but you might try going to Settings/Discussion in your dashboard and under Before a comment appears uncheck the two boxes.
     
    bob25, Sep 16, 2010 IP
  4. vicky1408

    vicky1408 Peon

    Messages:
    66
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Thank you it works
     
    vicky1408, Sep 17, 2010 IP