Once way of doing it – I am sure there are other ways too – is to make a page template for books: books.php
You can make a copy of page.php and rename it.
In the top of the file you place the usual Page Template code as in:
<?php
/*
Template Name: Books
*/
get_header(); ?>
Below the normal loop, you then place the code for a new loop:
<?php $loop = new WP_Query( array( 'post_type' => 'books') ); ?>
<?php while ( $loop->have_posts() ) : $loop->the_post(); ?>
Don’t forget to close it with the call for <?php endwhile; ?>
at the end.
With this method you can within WordPress add a Page called Books and assign this particular Template to it. This way you can still add general text to the page too and below display the list of all books.
Related Posts:
- Custom Post Type URL Rewriting?
- Add .html (dot HTML) extension to custom post types
- Multiple post types – share same ReWrite slug?
- How to pass URL parameters for advanced taxonomy queries with multiple terms for one custom taxonomy
- Custom post types – Use post_id in permalink structure when using has_archive => true
- How to modify URL structures in custom post types and taxonomies or terms
- Slug for custom post type archive
- Change page /2 to /transcript with a Rewrite
- Permalink rewrite with custom post type and custom taxonomy
- Make permalinks based on an ACF-field
- How would I leverage custom Taxonomies in this scenario?
- WordPress returns 404 on custom rewrite rule conflict in parameters
- How to rewrite custom post type URL for multiple depths instead of one specific depth
- Regex problem in an add_rewrite_rule
- Multiple Permalinks for custom post type post
- Interesting Custom Post Type Slug with Taxonomy and Custom Field
- WordPress Rewrite rule for nested post types
- Category base to url in custom post type/taxonomy
- Is slug “type” reserved and can’t be used in taxonomy rewrite?
- Custom Post Type get_post_type_archive_link( $post_type ) returns false
- Permalinks when filtering multiple custom post types by single taxonomy
- custom taxonomy archive by year
- How to Combine Two Custom Post Types into Single Permalink Structure
- Redirecting when changing custom post type slugs?
- How can you handle rewrite rules for custom post types with option to filter on custom taxonomy terms?
- Conditional regex in add_rewrite_rule() for specific query filters & pagination
- How to remove slugs from multiple custom post types
- Custom taxonomy in URL showing 404
- Rewrite slug of custom post type to include post-id
- Rewrite rules for custom posts types
- How to change custom post type permalink structure
- Front custom edit post page for each post
- Categories of Custom Post throws gives 404
- How to build custom route by adding taxonomies to URL ? ex: www.demo.com/communities/palo-alto/
- How Can I Change the Custom Post Type Slug to the Taxonomy Slug in the URL?
- Use same slug base for Custom Post Type posts, and multiple taxonomy terms
- Rewrite Question Mark in Post Template to Make it Pretty URL
- Index page with the same id as the slug
- Custom post type as home page with custom url
- How to rewrite url for any specific taxonomy?
- Custom post URL 404 error
- URL rewrite add author as base
- WordPress custom post type split into pages
- Including taxonomy term before post type breaks top level pages
- Correct procedure for advanced permalinks
- Custom Post Types hierarchy and rewrite
- CPT’s with landing page instead of archive – Url Rewrite?
- How to get list of taxonomy slugs ordered parents>childs?
- Rewrite Endpoints and CPTs – How to use in a plugin
- Custom post type’s permalink adds the name of the post type before the post name
- Custom taxonomy and post type with same slug
- Best way to specify “article type” in URL
- I can’t access custom taxonomy page listing
- How to have permalink like domain.com/term/postname?
- Combine multiple CPT names to create valid permalinks
- How to rewrite custom taxonomy term archive to use THE SAME SLUG/front as CPT
- How to create custom search result page with custom URL parameters for custom post type?
- Page inside custom post type (url rewrite?)
- How to rewrite the post slug of a custom post type post
- rewriterule not working
- Custom post type URL
- Custom Post Type View Button in Admin Gives 400 Error
- Custom Post Type URL Rewrite’s
- Why does my URL keep returning 404 error code?
- Custom Post Type nest under a normal WordPress Page
- restricting custom rewrite to just one custom post type
- Use a different URL path / permalink for CPT
- Rewrite URL for CPT to domain/post-name/post-id
- How to apply multiple rewrite_rule to a single custom post type url?
- Remove custom permalink base from CPT custom category and custom tags
- How to change URL for custom post type archive?
- How to handle this wordpress custom post type rewrite problem?
- Custom permalink structure for custom post types including multiple taxonomy
- How can I assign multiple parents to CPT?
- CPTs relationship
- Custom Post Type not using correct page template
- Permalinks: custom post type -> custom taxonomy -> custom sub taxonomy -> post
- Pretty Permalinks with CTP and Taxonomies / Hierarchical
- add_rewrite_tag broke permalinks that doesn’t use that specific tag
- Rewrite url for custom post type with specific url
- Customise Permalink Structure For Custom Post Types
- How to use a custom post type as child of a particular post of another CPT?
- How to make “single post” permalink maintain it’s sub-page structure
- Two CPT: one is using part of the custom rewrite slug from the other
- I have a custom taxonomy assigned to two post types. How do I create URLs for different term archives for each post type?
- Rewrite Endpoint Url without ? before endpoint
- How Can a CPT in WordPress have a page 2 without an error?
- Remove sequential number from permalinks
- Customizing the custom post type permalink
- Parent cpt/child custom post type URL permalink relationship
- Rewrite Rule & Regex – Extract ‘cat-name’ and ‘page-number’ from http://domain.com/custom-post-type/category/cat-name/page/page-number
- 2nd and 3rd Custom Post Type URL’s 404ing
- Generate daily archive whenever any post type is added
- How to change custom post type slug without damage seo? [closed]
- Custom Post & Taxonomy rewrite break regular post & page
- Rewrite Rule for custom post type link with or without taxonomy terms
- Rewrite nested urls for custom post type
- Custom post type Premalinks main page and details page
- Rewrite rule taxonomy url with different values in one function
- Custom URLs between different post types, using “Pods”