Title: Select Default Options for all posts
Last modified: August 21, 2016

---

# Select Default Options for all posts

 *  Resolved [verseone](https://wordpress.org/support/users/verseone/)
 * (@verseone)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/select-default-options-for-all-posts/)
 * Is there a way to have certain roles and options checked automatically when a
   new post is created? Like having Administrators have access to a post’s content
   by default.
 * [http://wordpress.org/plugins/user-specific-content/](http://wordpress.org/plugins/user-specific-content/)

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

 *  Plugin Author [Bainternet](https://wordpress.org/support/users/bainternet/)
 * (@bainternet)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/select-default-options-for-all-posts/#post-4340186)
 * The fields are stored as post/page meta so you can set the meta fields automatically
   when you create a post/page ex:
 *     ```
       add_action('publish_page', 'add_custom_field_automatically');
       add_action('publish_post'. 'add_custom_field_automatically');
       function add_custom_field_automatically($post_ID) {
           global $wpdb;
           if(!wp_is_post_revision($post_ID)) {
               add_post_meta($post_ID, 'U_S_C_roles', array('Administrator'), true);
           }
       }
       ```
   
 *  [Pionect](https://wordpress.org/support/users/pionect/)
 * (@pionect)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/select-default-options-for-all-posts/#post-4340192)
 * I’m not satisfied with this answer.
 * Allmost all posts on my site should be private by default except for a few that
   should be public.
    This piece of code would make all posts the same, even after
   the editor changed the U_S_C settings. Isn’t it possible to set defaults for 
   the metaboxes on ‘new posts/pages’ so they can be overwritten by editors?
 *  Plugin Author [Bainternet](https://wordpress.org/support/users/bainternet/)
 * (@bainternet)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/select-default-options-for-all-posts/#post-4340193)
 * I’m sorry to hear your “not satisfied with this answer”
    but I coded this plugin
   they way i needed it and shared it with the WordPress community the way I like.
 * Also your use case is not everyone’s use case and not everyone use this plugin
   the way you do on your site.
 * I posted a solution to help overcome this “issue” as an example you can use it
   or not.
 * You can suggest and request features but not dictate what or how the plugin should
   work just because you need it that way.
 * maybe when I’ll find the time or sponsor I’ll add an option to define your defaults.
 *  [Pionect](https://wordpress.org/support/users/pionect/)
 * (@pionect)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/select-default-options-for-all-posts/#post-4340194)
 * I didn’t try to dictate you, my apologies if it looked like that.
    Consider this
   my feature request. To me it seemed helpful for the community to be able to set
   defaults.
 * Two solutions are: custom hooks in your plugin or a settingspage for your plugin.
 * For others looking for a solution, here is mine:
    add the following code to your
   theme’s functions.php
 *     ```
       add_action('admin_enqueue_scripts', array($this, 'private_usc_script') );
   
       function private_usc_script($hook) {
         if( 'post-new.php' != $hook ){
           return;
         }
   
         wp_enqueue_script( 'privatecontent', get_template_directory_uri() . '/js/privatecontent.js' );
       }
       ```
   
 * create a new file in your theme’s js folder called ‘privatecontent.js’
 *     ```
       jQuery(document).ready(function($){
          $('#User_specific_content input[name*=logged]:first').prop('checked',true);
       });
       ```
   

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

The topic ‘Select Default Options for all posts’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/user-specific-content_ffffff.svg)
 * [User Specific Content](https://wordpress.org/plugins/user-specific-content/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/user-specific-content/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/user-specific-content/)
 * [Active Topics](https://wordpress.org/support/plugin/user-specific-content/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/user-specific-content/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/user-specific-content/reviews/)

 * 4 replies
 * 3 participants
 * Last reply from: [Pionect](https://wordpress.org/support/users/pionect/)
 * Last activity: [11 years, 11 months ago](https://wordpress.org/support/topic/select-default-options-for-all-posts/#post-4340194)
 * Status: resolved