You can Use single-{posttype}.php for the single template.
And, if you have register your post type with the has_archive argument set to true, then you can use archive-{posttype}.php for your archive template.
You can check Template Hierarchy
Also for 404 Page, double check that page slug and post-type slug is NOT SAME. I mean check whether you have created any page with slug “books”.
Related Posts:
- Getting custom taxonomy from custom post type
- WordPress Search documentation: how to improve search query using taxonomy terms, custom meta fields?
- Retrieve a specific field from taxonomy term through advanced custom fields [closed]
- get terms that have post with custom post type between 2 values
- Show ACF field from custom taxonomy and display on the single template
- Building an Advanced Search (text, tags, category, custom fields) – Getting the wrong SQL query
- Linking three taxonomies with ACF
- Get Custom Field Values by Another Custom Field in WordPress
- How to retrieve category NAME instead of ID in a function with a taxonomy custom field?
- Create 3 Level Relations with ACF and WordPress
- get_posts of Custom Post Type AND Custom Taxonomy
- Retrieve value of a category’s custom field
- Custom Taxonomy terms aren’t getting referenced or saved in Quick Edit or Bulk Edit, only on Single product page?
- Query Custom Post Type Taxonomy term with multiple parameters
- Lists custom taxonomy terms that has specific custom field value assigned to the term (not post)
- How to group posts and get a mixed posts and groups view?
- Get A Custom Field From A Custom Taxonomy Of A Custom Post Type [closed]
- ACF – Retrieve custom taxonomy from a relationship field
- Custom front-end form for adding post – Category problem
- Create loop from selected terms in ACF taxonomy field
- Sort custom posts by date and then by taxonomy
- Display Custom Field or Custom Taxonomy in front page /post/product
- WP_Query not using custom taxonomy categories on custom post type
- If ACF Post Object post has custom taxonomy term…
- Some posts not displaying by taxonomy term
- Taxonomy shows up twice on Custom Post Type
- How to display custom post type pagination buttons when processing AJAX request
- Display custom tax in “while” loop
- Best way to have one product in both rental and sale parent category
- How to query posts by meta keys AND under specific category?
- How to query the content of a specific custom post type?
- Advanced Custom Fields: query posts filtered by multiple field values
- ACF Relationship: Group posts by parent category term, then child [closed]
- Custom taxonomy meta fields
- Custom Sort Order for Custom Post Type Taxonomy
- What are the differences between custom post type and custom page templates?
- WP insert post and custom taxonomy
- Templates for Custom Post Types and Custom Taxonomies
- Add links to post categories and taxonomies in wysiwyg link modal?
- Query multiple taxonomy in Custom Post Type
- automatically create taxonomy with same name as post title
- Separate Custom Post Type Taxonomy by Comma
- Custom Taxonomy Breadcrumb Navigation
- Remove “-2” from a Toolset Types URL with the same post name
- Create Custom Post Type Archive Page with Sub Categories Navigation Sidebar
- WordPress import not importing custom taxonomy
- Ordering Custom Post Types with WP_Query
- Custom Post Type and Taxonomy combination
- How to create an array for a CPT post ID to use in an IF/WHILE statement
- How to check the terms in single custom post type template
- Custom Post type with ACF in REST API, how do I get those values?
- How can I move a custom taxonomy and its data from one post type to another?
- Show listings from Impress Listing plugin in random order using taxonomy and terms
- Posts from all the categories are being displayed instead of particular category
- Get next and previous 3 posts in a term in single post page
- search also in taxonomy, tags and custom fields
- Custom Post Types, URL rewrite on multiple CPTs
- redirecting improperly after updating custom taxonomy term when referring from CPT edit page
- Bulk Update Custom Fields for Custom Post Types
- CPT’s with landing page instead of archive – Url Rewrite?
- How to produce a sub-page-system in WordPress
- Custom post type pagination 404
- Custom Taxonomy not displaying all post
- How to Display Posts From Category Within a Custom Taxonomy?
- Iterating through Object Array to customise display of full custom taxonomy for custom post type
- Custom Post Type not showing in main loop
- My custom taxonomy is only displaying 1 of 3 terms
- How to change single custom post template by custom taxonomy?
- How to query Posts from a custom post type which contains a custom taxonomy?
- Archive page for custom post type and custom taxonomy
- How do I ensure that post_type and Taxonomy use the same slug?
- Using ACF values in nested WP queries for CPT with date values in the past
- 404 – Taxonomy Archive Page
- Why do my custom post types stop displaying over time?
- CPT tags not showing when editing post
- WP_Query for custom taxonomies showing posts from non-specified terms?
- I want to create pagination for my custom post type archive that i am displaying with loop
- Showing taxonomies with terms that are attached to custom post
- Saving Child Terms on front end not setting parent
- Custom taxanomy and custom post type – pagination leads to 404
- Getting all custom post taxonomies and exhibiting only part of them
- Custome post type “tags” pick default archive instead of custom post type archive
- Custom post type AND custom taxonomy are not connected
- Single page archive – get coresponding taxonomy and terms
- How to assign custom post template to its custom taxonomy terms
- Excluding top level from taxonomy and post loop
- Get post id of permalink for a specific custom post type?
- Displaying custom post types with taxonomy
- Using one custom taxonomy.php for two custom taxonomies?
- If you’re calling a dynamic css inline style does that div have to be in the loop?
- If i have custom post type with 5 custom fields do i have to create a new loop to reference each one?
- Add taxonomy to custom post type archive
- Custom taxonomy archive not showing posts of certain child taxonomies
- posting twice from an array?
- How to show animal lineage/pedigree in WordPress?
- Custom Post Type Loop breaking php
- Styling first post using Advanced Custom Fields
- Custom post type with custom taxonomy
- How do i get the taxonomy term name on the CPT archive page?
- Permalinks for Custom Post Types and Taxonomies