WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I created a custom post type with a taxonomy defined, but I am having trouble getting an archive page to show up.

  1. I get a 404 page not found. The individual post shows up but nothing on archives page.

functions php.

function create_post_type() {  
    register_post_type( 'my_properties',  
            'labels' => array(  
                'name' => __( 'Commercial Properties' ),  
                'singular_name' => __( 'My Property' )  
        'public' => true,  
        'menu_position' => 5,  
        'rewrite' => array('slug' => 'Myproperties')  

add_action( 'init', 'create_post_type' ); 

function property_taxonomy() {  
        'hierarchical' => true,  
        'label' => 'Category',  
        'query_var' => true,  

add_action( 'init', 'property_taxonomy' );  

I have tried:

• Creating an archive-my_properties.php (should the page be named after the registration or the slug? • Resaved permalinks • Flushed Rewrite rules

share|improve this question
Please separate ACF issue into a separate question (if it would be in-scope for WPSE). – Chip Bennett Nov 12 '13 at 19:35
up vote 1 down vote accepted

You need to declare 'has_archive' => true in the arguments array you pass to register_post_type(). The default value is false, which means that WordPress does not generate an archive index for the post type.

share|improve this answer
good grief, tried everything except to see if the vcr was plugged in. – user31344 Nov 12 '13 at 19:44

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.