Requiring post approval? (3 posts)

  1. Jerry
    Posted 6 years ago #

    I have a sort if unique situation. I'm developing a realestate system for WP as a plugin whereas multiple authors can freely list their land. However to cut down on spam I want to require each post be approved by admins.

    Is this possible? The only plugin I've found still shows posts in search rather thanlocking it completely. Any ideas or even some direction would be awesome.

  2. Hax
    Posted 6 years ago #

    well I don't really know the detail of your plugin but if your using wp_insert_post() function set the status to "pending" <?php wp_insert_post( array( 'post_status' => 'pending') ); ?>

    or if you are creating users set the user role to "Contributor" this role should allow the user to create new posts but not to publish them

    I don't know what plugin your using but posts that are not set to publish should not be showing on your search page.

    hope this helps

  3. Jerry
    Posted 6 years ago #

    Oh this is awesome, thanks. I'll have a look into wp_insert_post(). It's been so long since I've developed plugins for WP I have forgotten most of everything :)

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.