Pregunta

estado leyendo este sitio y Wordpress Codex y veo que hay una función para habilitar tipo personalizado de páginas en Wordpress. ¿Cómo puedo hacer la misma para permitir que para las páginas?

O, al menos, obtener las opciones de los mensajes a aparecer para la colocación de los puestos con cargo páginas?

¿Fue útil?

Solución

you question is not so clear for understand. Anyway i try to respond... You can use 'hierarchical' => true when you declarate you new custom post type.

For placing this new menu in some other position in your admin are use the proprety 'menu_position' => 5,.

Example (to add in your functions.php file):

add_action( 'init', 'create_my_post_types' );    

function create_my_post_types() {
    register_post_type( 'mycustompages',
        array(
            'labels' => array(
                'name' => __( 'My custom pages' ),
                'singular_name' => __( 'My custom page' )
            ),
            'public' => true,
            'hierarchical' => true,
            'show_ui' => true,
            'publicly_queryable' => true,
            'exclude_from_search' => false,
            'menu_position' => 5,
            'supports' => array( 'title', 'editor', 'comments', 'trackbacks', 'author', 'excerpt', 'custom-fields', 'thumbnail' ),
            'rewrite' => array( 'slug' => 'mypage', 'with_front' => false ),
        )
    );
}
Licenciado bajo: CC-BY-SA con atribución
scroll top