I want to create custom category page for posts "PAGE" for an internal use.
The categories will be the list of the clients
- I want to remove somes fields (like slug, description, parent category and also the grey texte)
Remove columns (description, count, slug)
Add custom field (client logo, market segment, free comment)
Make all fields required to add client (except free comment)
assigned a page to a unique category "Client"
Thats what I have :
That's what I'm looking for :
My approche :
I begin by adding the code on function.php to create categories
function add_taxonomies_to_pages() {
register_taxonomy_for_object_type( 'category', 'page' );
}
add_action( 'init', 'add_taxonomies_to_pages' );
if ( ! is_admin() ) {
add_action( 'pre_get_posts', 'category_archives' );
}
// Add Page as a post_type in the archive.php
function category_archives( $wp_query ) {
$my_post_array = array('post','page');
if ( $wp_query->get( 'category_name' ) || $wp_query->get( 'cat' ) )
$wp_query->set( 'post_type', $my_post_array );
}
?>
I try tu use PODS to create fields (logo client, market segment and free comment) and add requirement for all the fields except free comment. But the problem is when I create client is just need Name of the category "client" and created it (don't take on consideration the others fields).
Thanks in advance for your support.
UPDATE :
With CPT and ACF i created a new taxonomy named Customers with new fields (client name, client Logo, market segment, free comment)
Like you see in the picture below :
Now, i'm looking for disable or remove the fields in red and also the columns (name, description, slug, count) and replace them by (client name, market segment)
Advanced Custom Fields
plugin