I am registering a custom post type called "Products & Services". I have created a file within wp-content/themes/theme/
called archive-products&services.php
but it's not using this file.
I also tried archive-products & services.php
, archive-productsandservices.php
but still it wont load the template.
register_post_type( 'Products & Services',
array(
'supports' => array('title', 'editor', 'thumbnail'),
'labels' => array(
'name' => __( 'Products and Services' ),
'singular_name' => __( 'Service' )
),
'public' => true,
'has_archive' => true,
'rewrite' => array('slug' => 'productsandservices')
)
);
It works fine on two other custom post types called 'news' and 'products'. Is this an issue with blank spaces in the post type?