Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I have change your code .Please use this code..</p> <pre><code>add_action('init','create_custom_posttype'); function create_custom_posttype(){ $labels = array( 'name' =&gt; __( 'Custom Posts' ), //- general name for the post type, usually plural. The same as, and overridden by $post_type_object-&gt;label 'singular_name' =&gt; __( 'Custom Post' ), //- name for one object of this post type. Defaults to value of name 'menu_name' =&gt; __( 'Custom Post Menu Name' ), //- the menu name text. This string is the name to give menu items. Defaults to value of name 'all_items' =&gt; __( 'Custom Post All Items' ), //- the all items text used in the menu. Default is the Name label 'add_new' =&gt; __('Add New','Custom Post'), //- the add new text. The default is Add New for both hierarchical and non-hierarchical types. When internationalizing this string, please use a gettext context matching your post type. Example: _x('Add New', 'product'); 'add_new_item' =&gt; __( 'Add New Post/Add New Page (Custom Post)' ), //- the add new item text. Default is Add New Post/Add New Page 'edit_item' =&gt; __( 'Edit Post/Edit Page (Custom Post)' ), //- the edit item text. Default is Edit Post/Edit Page 'new_item' =&gt; __( 'New Post/New Page (Custom Post)' ), //- the new item text. Default is New Post/New Page 'view_item' =&gt; __( 'View Post/View Page (Custom Post)' ), //- the view item text. Default is View Post/View Page 'search_items' =&gt; __( 'Search Posts/Search Pages (Custom Post)' ), //- the search items text. Default is Search Posts/Search Pages 'not_found' =&gt; __( 'No posts found/No pages found (Custom Post)' ), //- the not found text. Default is No posts found/No pages found 'not_found_in_trash' =&gt; __( 'No posts found in Trash/No pages found in Trash (Custom Post)' ), //- the not found in trash text. Default is No posts found in Trash/No pages found in Trash 'parent_item_colon' =&gt; __( 'Parent Page (Custom Post)' ) //- the parent text. This string isn't used on non-hierarchical types. In hierarchical ones the default is Parent Page ); $args = array( 'labels' =&gt; $labels, 'public' =&gt; true, 'menu_position' =&gt; 15, 'map_meta_cap' =&gt; true, 'supports' =&gt; array( 'title', 'editor', 'comments' ), 'taxonomies' =&gt; array( 'category', 'post_tag' ), 'has_archive' =&gt; false ); if(!post_type_exists('custom_post')){ register_post_type('custom_post',$args); } } </code></pre> <p>remove the 'capability_type' => 'custom_post' in your code..</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload