Seems like it is working out of the box now. Except that if we want to access the custom post list from the category page (archive.php), we need to add the custom type to the wp_query.
// Took from : https://premium.wpmudev.org/blog/add-custom-post-types-to-tags-and-categories-in-wordpress/
function add_custom_types_to_tax( $query ) {
if( is_category() || is_tag() && empty( $query->query_vars[‘suppress_filters’] ) ) {
// Get all your post types
$post_types = get_post_types();
$query->set( ‘post_type’, $post_types );
return $query;
}
}
add_filter( ‘pre_get_posts’, ‘add_custom_types_to_tax’ );
It would be great if we don’t have to add manually the custom_post type to the query.