<?php
function myplugin_register_book_post_type() 
{
// Plantilla nicho para ficha
$args = array(
'public' => true,
'label'  => __('Niche Creator Plantilla Fichas','nichecreator'),
'labels' => array('add_new'=>__('Nueva Plantilla','nichecreator')),
'supports' => array('title', 'editor', 'custom-fields'),
'show_in_menu' => false,
'show_in_rest' => true,
/*
'template' => array(
	array( 'core/columns', array(), 
	array(
	 array( 'core/column', array(), array(array('core/paragraph', array('placeholder' => 'Parrafo1....','content'=>'%parrafo1')),array('core/paragraph', array('placeholder' => 'Parrafo2....','content'=>'%parrafo2')))),
	 array( 'core/column', array(), array(array('core/html',array('content'=>'<figure class="wp-block-image is-style-default"><img src="%foto" alt="%nombre"/></figure>')))),
	     )),
	array('core/heading', array('placeholder' => 'Author...','content'=>'%nombre. %busqueda','level'=>2)),
	//array('core/paragraph', array('placeholder' => 'Descripcion....',)),
	//array('core/html', array('content' => '[descripcion]',)),
	array( 'core/columns', array(), 
	array(
	 array( 'core/column', array(), array(array( 'core/html', array('content'=>'%iframe')),array( 'core/html', array('content'=>'%url')),array( 'core/html', array('content'=>'%email')))),
	 array( 'core/column', array(), array(array('core/group',array(),array(array('core/html',array('content'=>'%direccion')),array('core/html',array('content'=>'%telefono')),array('core/html',array('content'=>'%horario')))))),
	     )),
	 array('core/heading', array('content'=>'Elementos relacionados con %nombre','level'=>2)),
	 array('core/shortcode',array('text'=>'[relacionados]')),
	 //array('core/gallery',array(),array(array('core/image',array('url'=>'http://hauteskundeak.sareazblai.com/wp-content/uploads/2023/09/Syberia-6.jpg','id'=>'455')),array('core/image',array('url'=>'http://hauteskundeak.sareazblai.com/wp-content/uploads/2023/09/Syberia-5.jpg','id'=>'454')))),
			), // Template				
*/
			); // Args
					
register_post_type( 'nicho', $args );
// Plantilla nicho para categorias
$args = array(
'public' => true,
'label'  => __('Niche Creator Plantilla Categorías','nichecreator'),
'labels' => array('add_new'=>__('Nueva Plantilla Categoria','nichecreator')),
'supports' => array('title', 'editor', 'custom-fields'),
'publicly_queryable' => true,
'exclude_from_search' => true,
'show_in_menu' => false,
'show_in_rest' => true,
			); // Args
					
register_post_type( 'nichocat', $args );

}
 
add_action( 'init', 'myplugin_register_book_post_type' );

