single-book.php
should not have a custom query in it. WordPress has already queried the correct post, so new WP_Query( $args )
is completely unnecessary.
Your problem is that you’re missing the loop.
At the bare minimum single-book.php
should have:
<?php while ( have_posts() ) : the_post(); ?>
<h1><?php the_title(); ?></h1>
<?php the_content(); ?>
<?php endwhile; ?>
Related Posts:
- Hook for post and page load
- Custom Post Type Slug / Page Slug Conflict – Prevent use of reserved slug on page save?
- Custom Post Type as Page parent
- How to add a post from a custom post type as the static page?
- Page as child in custom post type slug?
- Is it proper to create a page just to generate a listing page (eg. for a custom post type)
- TV Show database – Best way for structuring it?
- Sanitizing post content for use in an email
- Custom Posts on Different Pages
- Pagination with custom loop
- Include images from pages in wp search.php results in default wp search
- Priority for Categories, Tags, Taxonomies, Posts, Pages and Custom Posts with same url
- Exclude Custom Post Type & Pages From Auto-Tag Function
- Wp-query causing problems with the_content();
- Display “Post 2 of 4” on single post page?
- How do I set the content for a post of a particular CPT?
- Custom Post Type Name Causing Problem
- Make custom post type display as a page
- wp_list_pages doesn’t work in hierarchical custom post type
- Rendering Custom Post Types independently of the theme in use
- Multiple portfolios with one custom post type?
- Is it possible to use pages to apply static content to each taxonomy level?
- Share parent path between Custom Post Types and Pages?
- ‘Pages’ widget alternative for custom post types?
- Custom Blog Post Listing in Genesis Sample Child Theme
- Pull in custom content types into page template
- How do I fix permalinks for custom post types that has the same slug as a page?
- Create custom PAGE with register_post_type
- Disable featured image
- How i can add ‘N’ page of ‘N’ pages under posts loop?
- Page vs Custom Post Types Differences/Issues
- Allow non-logged in users to see a future post after clicking on a list of future posts
- Exclude pages in archives results
- Make parts of your wordpress website completely built with data from external APIs?
- Assign same parrent Page to pages AND custom post types
- Allow Static Page Load Dynamic Child Pages
- No Permission to add new Page, Post or CPT with Admin role
- Content vs Template on custom post
- the_content filter on some post types only not working
- Show Custom Post Type meta boxes only on Page Edit
- Why does my content disapear when I make a page to match an archive name?
- How to use Custom Page Templates for hierarchical Custom Post Type
- Top Level pages in wordpress giving 404, but child pages working fine
- Page for custom post type
- Why is get_pages() returning a boolean?
- Pros and cons of a custom page vs custom post type template file
- How to include custom post type posts on a page?
- Including link to custom post type in ‘wp_list_pages’ function
- Can I change my post type to anything and my site still work?
- Dynamic bootstrap tabs with post_title doesn’t display the_content
- Page listing Custom Posts
- Display an authors post on a single page only when they are logged in
- Why are some of my custom posts not showing up on my page?
- How can I remove filters from custom post types?
- Conflict between wp_list_pages and get_posts – list pages not displaying
- Hide Status Option From WordPress Publish Metabox and Rename Published on:
- Add shortcode inside of the_content()
- Separate Content from gallery (custom post type)
- URL Rewrite – Page Archive
- How to set the mainpage of a custom post type?
- Setting a homepage – doesn’t seem to work
- wp_dropdown_pages with tax_query clause
- Am I mixing up the concept of posts pages and categories?
- filter the_content, custom post type, and wp_query
- Getting subpage of subpage – Custom posts
- Tag template not returning posts [closed]
- Does “Custom Post Type” can have page hierarhy option?
- How to set a ‘page’ as parent of a custom post type?
- Add custom template ‘sub-page’ to Custom Post type?
- Metabox collapsed by default
- Custom Post Type Single Page and Archive Page redirects to Home Page
- Create Custom page with custom domain
- Do not show child pages within a file page
- Disable Sidebar on certain pages
- Displaying posts inside table having issues
- Show posts from custom post type sorted by category/taxonomy on a one-pager/page
- Custom post types & Pages hierarchy – Error 404
- How to make “single post” permalink maintain it’s sub-page structure
- Include images from pages in wp search.php results in default wp search
- WordPress Contents Migration
- Creating Slider in wordpress theme with custom post
- Cannot use pages created on WP
- Filter Content on all Post Types
- Expandable WordPress content (text) inside a post
- Use the page picker from wordpress menu creation page
- Different post types arranged on one page
- archive.php can’t find categorized posts
- Pulling Content from Existing Database
- Is it possible to make one of two custom fields in Custom Post Type UI Required but not the other?
- How to Associate Posts with Pages
- Why are my wp urls showing page not found?
- Custom Post Type Slug / Page Slug Conflict – Prevent use of reserved slug on page save?
- Using custom post types within a section of a template
- Page that ‘subscribes’ to multiple categories
- Add HTML before a specific div?
- How to store queried custom data and use it in multiple pages?
- Highlight specific menu item when custom post is page
- How do I hide single category post on my post page
- How to add a regular page under a custom post type?
- An script/Plugin for automatic page creation per term