Title: Custom post type: Archive template doesn&#039;t work
Last modified: August 21, 2016

---

# Custom post type: Archive template doesn't work

 *  Resolved [Gloria](https://wordpress.org/support/users/erfo/)
 * (@erfo)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/custom-post-type-archive-template-doesnt-work/)
 * Hi.
 * I use the custom post type. I have a problem with the template of the archive,
   while the template of the post (single-customname.php) is ok.
 * I created the file “archive-customname.php”, I reset the permalink many times,
   but the archive template doesn’t function.
 * When I go to “www.example.com/?post_type=customname”, I see all the posts, but
   when I go to “www.example.com/customname/” there is a 404 error page.
 * I use also “has_archive => true”.
 * How can I resolve?

Viewing 1 replies (of 1 total)

 *  Thread Starter [Gloria](https://wordpress.org/support/users/erfo/)
 * (@erfo)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/custom-post-type-archive-template-doesnt-work/#post-4273436)
 * I resolved. I wrote **has_archive => ‘true’** instead **has_archive => true**

Viewing 1 replies (of 1 total)

The topic ‘Custom post type: Archive template doesn't work’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 1 participant
 * Last reply from: [Gloria](https://wordpress.org/support/users/erfo/)
 * Last activity: [12 years, 6 months ago](https://wordpress.org/support/topic/custom-post-type-archive-template-doesnt-work/#post-4273436)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
