title: How to make read only custom post type in wordpress?
body: <p>I create custom post type named as "Booking". I want to make this post type read only means "Add New" and "edit" option should not display in back end.
  This post type is not related with plugin.This is simple custom post type to display booking details.Here is my code..</p>
  
  <pre><code>function demotheme_register_post_types() {    
  
      //custom posttype booking
      $booking_labels = array(
                                  'name'               =&gt; _x( 'Bookings', 'demotheme_booking', 'demotheme' ),
                                  'singular_name'      =&gt; _x( 'Booking', 'demotheme_booking', 'demotheme' ),
                                  'menu_name'          =&gt; _x( 'Bookings', 'demotheme_booking', 'demotheme' ),
                                  'name_admin_bar'     =&gt; _x( 'Bookings', 'demotheme_booking', 'demotheme' ),
                                  'add_new'            =&gt; _x( 'Add New', 'demotheme_booking', 'demotheme' ),
                                  'add_new_item'       =&gt; __( 'Add New Booking', 'demotheme' ),
                                  'new_item'           =&gt; __( 'New Booking', 'demotheme' ),
                                  'edit_item'          =&gt; __( 'Edit Booking', 'demotheme' ),
                                  'view_item'          =&gt; __( 'View Booking', 'demotheme' ),
                                  'all_items'          =&gt; __( 'All Bookings', 'demotheme' ),
                                  'search_items'       =&gt; __( 'Search Booking', 'demotheme' ),
                                  'parent_item_colon'  =&gt; __( 'Parent Booking:', 'demotheme' ),
                                  'not_found'          =&gt; __( 'No bookings found.', 'demotheme' ),
                                  'not_found_in_trash' =&gt; __( 'No bookings found in Trash.', 'demotheme' ),
                              );
  
      $booking_args = array(
                              'labels'             =&gt; $booking_labels,
                              'public'             =&gt; true,
                              'publicly_queryable' =&gt; true,
                              'show_ui'            =&gt; true,
                              'show_in_menu'       =&gt; true,
                              'query_var'          =&gt; true,
                              'rewrite'            =&gt; false,
                              'capability_type'    =&gt; 'post',
                              'capabilities'       =&gt; array('read_post'=&gt;'read_demotheme_booking'),
                              'map_meta_cap'       =&gt; true,
                              'has_archive'        =&gt; true,
                              'hierarchical'       =&gt; false,
                              'menu_position'      =&gt; null,
                              'supports'           =&gt; array( 'title', 'editor', 'excerpt', 'thumbnail', 'page-attributes' )
                          );
  
      register_post_type( DEMOTHEME_BOOKING_POST_TYPE, $booking_args );
  
  
      //flush rewrite rules
      flush_rewrite_rules();
  }
  
  //add action to create custom post type
  add_action( 'init', 'demotheme_register_post_types' );
  </code></pre>
  
  <p>At back end side, i want view booking/all booking option only. Publish or update button should not display. </p>