Search
 
SCRIPT & CODE EXAMPLE
 

PHP

wordpress custom post type disable add new

register_post_type( 'custom_post_type_name', array(
  'capability_type' => 'post',
  'capabilities' => array(
    'create_posts' => false, // Removes support for the "Add New" function ( use 'do_not_allow' instead of false for multisite set ups )
  ),
  'map_meta_cap' => true, // Set to `false`, if users are not allowed to edit/delete existing posts
));
Comment

PREVIOUS NEXT
Code Example
Php :: var dump php look clear 
Php :: tl to usd 
Php :: startsWith() and endsWith() functions in PHP 
Php :: Class "AppHttpControllersAdminAuth" not found 
Php :: php run command line 
Php :: validate each value from array laravel 
Php :: get values from text file php 
Php :: eloquent limit vs take 
Php :: php random integer 
Php :: mkdir permission denied php 
Php :: creer un modele laravel 
Php :: php time ago 
Php :: connect to sql database 
Php :: laravel menu active class 
Php :: join in laravel eloquent 
Php :: drupal 7 hook_form_alter 
Php :: Exception::getMessage in php 
Php :: wordpress custom post type add post_tag 
Php :: php move file to another directory 
Php :: replace multiple characters one string php 
Php :: php previous page 
Php :: break and continue in laravel 
Php :: laravel map array 
Php :: wordpress translate specific text php 
Php :: File Reading Mode PHP 
Php :: take and skip in laravel 
Php :: create function php 
Php :: set session in laravel 
Php :: unlink is a directory laravel 
Php :: xamp to test on mobile 
ADD CONTENT
Topic
Content
Source link
Name
8+3 =