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:
- Rewriting a custom-post-type permalink with taxonomy term?
- Remove custom post type slug from URL
- Custom post type, no need for single view, plus want permalink rewrites that include hash in URI
- Using /%postname% for a custom post type
- Why would WordPress use ‘attachment’ in a custom post type’s query string?
- Custom post type URL with post ID that allows archiving and paging
- Changing the URL Structure of a Paginated Custom Post
- Custom post type taxonomies URL rewrite
- Enforcing canonical URLs with multiple custom post types
- Create permalink structure for one taxonomy archive per custom post type
- Custom permalinks
- Issues when rewrite rules collide?
- Custom post type permalink changing itself every other change
- Custom post type’s get_permalink returns wrong url
- Custom post type permalink structure with the category also acting as an archive
- Prepend meta_value to permalink of post
- How to create custom URLs for Custom Post Type sub sections?
- Custom Permalinks for Custom Post Types and Taxonomies
- Custom Post Type Rewrite Rule for Author & Paging?
- Removing parent slug from URL on custom post type
- Multiple parameters in a custom post type url rewrite
- URL rewrite and navigation structure for wordpress custom post type
- How to properly prefix blog post URL’s
- Custom post type category, taxonomy and URL rewrite problem
- Rewrite on custom post type permalink not working?
- Custom post-type in root directory, blog posts in subdirectory
- Custom Post Type/ Taxonomy URL rewrite
- Custom query variable – get wordpress to redirect to nice permalink url
- Permalinks for Taxonomy and Custom Post Type
- Multisite with a single, shared custom post type, while retaining site URL
- Share parent path between Custom Post Types and Pages?
- Pretty URLs for Custom Post Type & Custom Taxonomy with Duplicate Slugs on WPML
- Rewrite URL for only archive page (custom post type)
- Remove base slug in permalinks of hierarchical custom post type
- Change custom post type slugs, with category/taxonomy before post type name
- Add archive slug to default post post type
- Custom Post type and permalink settings
- Rewrite post type slug only for child theme
- wp_list_categories() – current-cat class also inside posts?
- Adding custom post category slug in permalink causes 404 error for pages and posts
- How can I use get_post_meta with add_rewrite_rule to build custom permalinks?
- How can I make the slug of the taxonomy also the slug of the custom post
- Set a CPT slug as a base name for all the taxonomies
- Custom taxonomy rewrite with query var returns %2F in URL
- Remove slug in URL custom post type
- Versioned Custom Post Type (Not the same as revisions)
- cpt and page sharing same base permalink
- Custom post Type, child of a Page?
- Hide or disallow default custom post type url?
- URL rewriting for CTP assigned entity
- Custom taxonomy returns 404
- Added Custom Post Type and the View Option Doesn’t Work
- Permalink structure with custom taxonomies and custom post type like /parent-tax/child-tax/custom-post-type-name (with no base name)
- Pretty URLs and custom post types
- 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
- 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
- Permalinks: custom post type -> custom taxonomy -> custom sub taxonomy -> post
- Pretty Permalinks with CTP and Taxonomies / Hierarchical
- 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
- 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
- Looking for advice how to approach building a WordPress plug-in
- Custom Post Type with multiple Custom Taxonomies / Hide Taxonomy Slug from URL
- Custom archive URL as a subfolder of the custom post type slug
- Custom slugs with dates & IDs on Custom Post Type
- Add post id to url instead of WordPress default -2 suffix
- How to add random prefix (based on related page slug) to custom post type?