Skip to content

Instantly share code, notes, and snippets.

@gydoar
Created July 26, 2017 19:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gydoar/41821ac84d118897b623754823a4a570 to your computer and use it in GitHub Desktop.
Save gydoar/41821ac84d118897b623754823a4a570 to your computer and use it in GitHub Desktop.
Registrando post type plugin
<?php
function post_type_flexslider() {
register_post_type( 'flexslider',
array( 'labels' => array(
'name' => __( 'Flexslider', 'andres-dev' ),
'singular_name' => __( 'Flexslider', 'andres-dev' ),
'all_items' => __( 'Todos los sliders', 'andres-dev' ),
'add_new' => __( 'Agregar nuevo', 'andres-dev' ),
'add_new_item' => __( 'Agregar nuevo slider', 'andres-dev' ),
'edit' => __( 'Editar', 'andres-dev' ),
'edit_item' => __( 'Editar slider', 'andres-dev' ),
'new_item' => __( 'Nuevo slider', 'andres-dev' ),
'view_item' => __( 'Ver slider', 'andres-dev' ),
'search_items' => __( 'Buscar slider', 'andres-dev' ),
'not_found' => __( 'No se encontraron resultados', 'andres-dev' ),
'not_found_in_trash' => __( 'No se encontró nada en la Papelera', 'andres-dev' ),
),
'public' => true,
'menu_position' => 2,
'menu_icon' => 'dashicons-images-alt',
'supports' => array( 'title', 'thumbnail')
) /* Fin de las opciones */
); /* Fin del registro post type */
}
add_action('init', 'post_type_flexslider');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment