Created
July 30, 2015 09:12
Revisions
-
jandrodev created this gist
Jul 30, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,25 @@ function create_post_type_eventos() { register_post_type( 'eventos', array( 'labels' => array( 'name' => __( 'Eventos' ), 'singular_name' => __( 'Eventos' ), 'all_items' => __('Todos los eventos'), ), 'public' => true, 'has_archive' => true, 'rewrite' => true, 'menu_icon' => 'dashicons-calendar', 'menu_position' => 6, 'supports' => array( 'title', 'excerpt', 'editor', 'thumbnail' ) ) ); $set = get_option('post_type_rules_flased_eventos'); if ($set !== true){ flush_rewrite_rules(false); update_option('post_type_rules_flased_eventos',true); } } add_action( 'init', 'create_post_type_eventos' );