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
- ACF Pro simple Business Directory – Requesting assistance with created Templates and associated Functions.php Coding
- Custom fields disappearing when a custom post type is assigned
- Custom Taxonomy as checkbox or dropdown
- 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
- Query multiple taxonomy in Custom Post Type
- automatically create taxonomy with same name as post title
- Separate Custom Post Type Taxonomy by Comma
- Get child terms of current term of the current post
- Allow duplicate slugs for posts on Custom post type in different categories/taxonomy?
- 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
- Taxonomy structure of Sport site
- Custom post type custom taxonomy archive page name
- 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
- Custom post type templating problem
- Custom Taxonomies not appearing in Admin
- Custom Post Types, URL rewrite on multiple CPTs
- redirecting improperly after updating custom taxonomy term when referring from CPT edit page
- Which post does a taxonomy term belongs to?
- Custom Post Type – No Results Found
- CPT’s with landing page instead of archive – Url Rewrite?
- How to make front end form only accept certain values
- Query based on custom fields start and end date
- Create a permalink structure with custom taxonomies and custom post types gives 404
- Not Able To Render Single-CustomPostType.php File
- Using page slug in wp_query
- Custom taxonomy (categories) on custom post type return no results
- previous_post_link in same taxonomy in custom post type
- Remove taxonomies using register_post_type_args
- Different options per post type in WP_Query
- Custom taxonomy not saving correctly
- Display a random customposttype2 excerpt in single-custompostype1.php that shares same taxonomy
- Custom Post Type Rewrite Throws Headers Sent Errors
- Custom taxonomy does not display in custom post loop
- Create if else for post types in WP_Query ‘post__in’ values
- CPT email notification including only new value custom fields
- Return multiples taxonomies with wp_get_object_terms
- How to add CSS class field in Custom Taxonomy?
- Save_post acf data not updating category of post type
- Display Specific Posts at Start of Loop
- How can I output a post’s custom taxonomies to a two column list?
- Pagination with a custom post type
- taxonomy – templates are not loading
- week days sorting based on starting day
- Displaying custom taxonomy related to each post type
- Customize url from the_terms
- Group/list/sort custom post type posts by date in tabs from acf datepicker field
- Ordering Posts List By Taxonomy Terms?
- How do I put `tax_query` in this WP_query?
- Get posts associated with custom taxonomy alternate way
- Exclude Custom Post Type from shared Custom Taxonomy
- How to display elements of different post types?
- exclude posts from a custom category
- Problem with Custom Post Types, Taxonomy, permalink, Archive
- Automatically add custom taxonomy when meta value gets to a set number or beyond
- What would be the optimal CPT / Taxonomy design for the following entities structure
- List all posts in hierarchy and groupped by each taxonomy