Thanks ??
I’ve solved it.
This works, but I had to re-update the permalinks config to see the effect.
<?php
/*
Plugin Name: Aggressivex Network Custom Post
Version: 1.0
Author: Luis Mu?oz
Author URI: https://www.aggressivex.com/author/luis.munoz/
*/
class AN_custom_post
{
var $post_type_name = 'product';
var $post_type_label = 'Products';
function __construct()
{
add_action('init', array(&$this,'register_post'));
}
function register_post()
{
register_post_type($this->post_type,
array(
'label' => $this->post_type_label,
'public' => true,
'show_ui' => true,
'hierarchical' => true,
'rewrite' => array(
'slug' => '',
'with_front' => true
),
'hierarchical' => true,
'supports' => array(
'title',
'editor',
'custom-fields'
),
)
);
}
}
new AN_custom_post();