Skip to content

Instantly share code, notes, and snippets.

@kachi
Created June 14, 2012 12:18
Show Gist options
  • Save kachi/2929960 to your computer and use it in GitHub Desktop.
Save kachi/2929960 to your computer and use it in GitHub Desktop.
<?php
add_action('init', 'foo_custom_init');
function foo_custom_init()
{
$args = array(
'exclude_from_search' => true, // ここでtrueを指定する
'public' => true,
'publicly_queryable' => true,
'show_ui' => true,
'show_in_menu' => true,
'query_var' => true,
'rewrite' => true,
'capability_type' => 'post',
'has_archive' => true,
'hierarchical' => false,
'menu_position' => null,
'supports' => array('title','editor','author','thumbnail','excerpt','comments')
);
register_post_type('foo',$args);
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment