has_archive was set to true and my understanding is that now when I goto /articles I am supposed to see all posts of type article.
Nowhere in your code is articleS mentioned, the slug of the post type is article
, so the URL of its archive should be /article/
. If you want it to be articles
you have to say so.
In this case, it’s the classic mistake of registering a post type or taxonomy, but not flushing permalinks to add their rules. Go to the permalinks setting page, and resave.
As for the template archive.php
, this is irrelevant to wether the page loads or not. The template hierarchy will fallback to index.php
which is required for a theme if no other templats are found. Additionally, archive.php
doesn’t make the URL an archive. The URL makes it an archive, and the fact it’s an archive makes WP load that template. WP has already figured out what posts to fetch before the template is chosen.
Related Posts:
- Make Two Views of Post Type Archive At Two URLs
- Showing only future posts in archive based on custom field date
- How to remove current year from wp_get_archives
- Archive template
- Archive list for custom post type categories
- Check if is post type archive and in category
- Not able to see CPT archive template
- Create Archive Page with Visual Composer
- Add archive/category results to single post page
- Archive Custom Post Type
- Custom Post Type archive (archive-{post-type}.php) is not working
- How to display archive page posts based on author_id
- Limiting the Archive page to posts posted by particular author
- Using WP_Query how can I show events (a custom post type) that are in the future?
- Archive-Custom-Post-Type order by Event Date, ASC, and hide events that have completed
- What code do I “comment out” to remove the loop from this Custom Taxonomy
- Group Archive list by posts tag
- Custom Post Archive – display page 1 differently then subsequent pages
- CountUp timer for custom post
- Custom Post Type Archive – archive.php is present, but it is not being used
- Custom post type archive url when post type has archive string
- get custom post archieve by month
- Customing Annual Archive plugin
- Notice- undefined variable post and trying to get property of non-object
- WordPress Rewrite Url with arugments
- How to link to an archive-special.php from a custom front-page template?
- Archive page for custom post type shows regular posts, too (by category)
- How to create archive child pages with good Yoast SEO meta?
- How to remove custom post type archive
- How to use a custom post type archive as front page?
- Custom Post Type Archives by Year & Month?
- Get custom post type slug for an archive page
- Create a custom archive page for a custom post type in a plugin
- Custom Post Type Settings page, choose page to display archive
- Adding a menu item for a Custom Post Archive
- Custom Post Type Archive Page not showing
- Adding custom post type archives to a WordPress menu
- How to set a custom post type to have viewable future posts
- Custom Post Type Template – Archive
- Page Template as Custom Post Type Archive
- Custom post type yearly/ monthly archive permalinks
- Can’t get post id on page that is a custom post type archive
- Meta_Query as a way how to setup CPT permalinks – is it a good thing?
- How to rewrite slug of custom post type archive page
- How do you create an archive for a custom post type from a plugin?
- pre_get_posts with tax_query causes empty result
- Proper way of making custom post type landing page or archive page
- Custom Post Type Archives by Date with Custom Permalink
- Sort Custom Post Type Archive by Taxonomy Term [duplicate]
- How to List All Custom Post Types Names (Not Posts)
- How to seamlessly redirect between different archive and singular slugs?
- Change title in head on Archive page
- Archives for custom post type based on a “date” meta value
- Custom Post Type Archives with 0 Posts Redirects as 404
- How to filter custom post type archive by meta value
- What are the advantages of using a custom post type archive?
- Page is defaulting to archive page and not designated template
- custom post type archive page url to point to Page permalink
- “Edit” option for custom post types archive page
- Change number of posts to show on Archive page (custom post type)
- Custom Post Type archive as front page
- Better to use a post type archive, page template, or shortcode for generating a highly configurable CPT archive?
- Custom Post Type Archive in Sub Folder
- Get monthly archives for custom post type
- Is it possible to remove the posts_per_page limit on a specific post type?
- Add Settings to Custom Post Type
- Is it possible to have an index page for taxonomy term for each custom post type it is assigned to?
- Custom post type permalink structure with the category also acting as an archive
- How to get_queried_object on multiple objects?
- Custom Post Type Works but Still Shows “Page Not Found”
- Assign Page Template Within A Custom Post Type
- Custom Post Type / Taxonomy Slug / Post Title with post type archive
- Rewrite custom post type url’s adding meta box values
- I can’t set meta_key in my custom post type query
- Hide child term posts on parent term pages
- Posts per Page on custom Taxonomy Template
- Compare 3 custom fields and sort by oldest
- How to group by taxonomy on Custom Post Type archive
- Post type archive page not working
- Adding Sticky functionality to Custom Post Type Archives
- Output yearly archive within a page
- paginate function in archive for custom-post-type
- Adding custom post types to archive.php
- Custom Post Type – Archive page title
- Alphabetical sorting of custom post type – one letter per page
- List all posts in Custom Post Type but group dynamically by Custom Taxonomies
- is_post_type_archive not working in feed
- Update Old Links To Pretty Permalinks Custom Post Type
- Archive page for taxonomy of custom post type
- Archive by custom post type and custom date field
- Add meta data to the custom post type ARCHIVES page
- Should I change these content meta types before building complex archive page?
- Find out if request is for custom post type archive before query runs
- archive-{$post_type}.php not loading. instead the default archive.php loads
- Getting taxonomy terms used by custom post type
- Custom post type archive sorted and grouped by date in post meta field
- Removed slug from CPT, now How/where do I hook the filter to the taxonomy term archive pages link?
- Archive or taxonomy pages not working for custom post type
- How to have Multiple Archives Widgets, one archive widget per category (in a different page)?
- Create Custom Post Type Archive Page with Sub Categories Navigation Sidebar