filthyfox
5/30/2017 - 3:16 PM

Creating a new post type

Creating a new post type

add_action( 'init', 'create_post_type' );
function create_post_type() {
  register_post_type( 'advice',
    array(
      'labels' => array(
        'name' => __( 'Советы покупателям' ),
        'singular_name' => __( 'Совет' )
      ),
      'public' => true,
      'has_archive' => true,
    )
  );
}