Title: Custom Post Type Slug Problem
Last modified: August 30, 2016

---

# Custom Post Type Slug Problem

 *  [caroline](https://wordpress.org/support/users/makeupedia/)
 * (@makeupedia)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/custom-post-type-slug-problem/)
 * I can’t get my `produkt.php` to work, and understand there’s something wrong 
   with my page slug.
    I tried `archive-produkt.php` and `produkt-archive.php` and
   several other names.
 * This is the code in my functions.php, so if someone understand what’s going on
   here I will send you a virtual flower.
 *     ```
       // Register Custom Post Types
       add_action('init', 'register_custom_posts_init');
       function register_custom_posts_init() {
           // Register Products
           $products_labels = array(
               'name'               => 'Produkter',
               'singular_name'      => 'Produkt',
               'menu_name'          => 'Produkter'
           );
           $products_args = array(
       	'slug' 		     => 'produkt',
               'labels'             => $products_labels,
               'public'             => true,
               'capability_type'    => 'post',
               'has_archive'        => true,
               'supports'           => array( 'title', 'editor', 'excerpt', 'thumbnail', 'revisions' )
           );
           register_post_type('produkt', $products_args);
       }
       ```
   

Viewing 1 replies (of 1 total)

 *  [wpfan1000](https://wordpress.org/support/users/wpfan1000/)
 * (@wpfan1000)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/custom-post-type-slug-problem/#post-6490044)
 * Hi,
 * Please clarify:
 * >  I can’t get my produkt.php to work
 * What do you mean by this? The code is not working, the archive list is not working,
   etc? What is your desired outcome?
 * > I tried archive-produkt.php and produkt-archive.php and several other names.
 * With what code in it? Again what is it that you are trying to do?
 * If you are trying to get a list of archived produkt posts, have you tried /produkt?
 * Please note that if you want an archive list by url, you do not type in the .
   php as part of the url.

Viewing 1 replies (of 1 total)

The topic ‘Custom Post Type Slug Problem’ is closed to new replies.

## Tags

 * [custom post type](https://wordpress.org/support/topic-tag/custom-post-type/)
 * [slug](https://wordpress.org/support/topic-tag/slug/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [wpfan1000](https://wordpress.org/support/users/wpfan1000/)
 * Last activity: [10 years, 8 months ago](https://wordpress.org/support/topic/custom-post-type-slug-problem/#post-6490044)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
