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
- Integrating a custom post type into a page hierarchy
- Custom Post Type Slug / Page Slug Conflict – Prevent use of reserved slug on page save?
- Searching multiple custom post types and pages
- why doesn’t the_content() work in this {single-custom_post_type.php} page?
- Return current page type
- Custom Post Type as Page parent
- How to add a post from a custom post type as the static page?
- Get page by template?
- Page as child in custom post type slug?
- Get random custom-post-type post to display within content
- 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?
- Getting a div content of a post in wordpress?
- Is there a way to make a custom Page type?
- Sanitizing post content for use in an email
- Menu position (admin menu) of pages
- How to Add Pages Under Custom Post Type URL Structure?
- 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
- How to create user personal pages with information from their meta profile fields?
- 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
- Add $more_link_text parameter to the_excerpt()
- Exclude the_content (); from page password protection
- Multiple portfolios with one custom post type?
- Is it possible to use pages to apply static content to each taxonomy level?
- Making pages also serve as taxonomies? Or give full pages to taxonomies?
- 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
- Check if admin is editing page or custom post type
- remove child post from custom post type archive
- Pull in custom content types into page template
- custom posts on different page
- Trying to edit the single page from a Custom Post
- How do I fix permalinks for custom post types that has the same slug as a page?
- Create custom PAGE with register_post_type
- Should I use custom taxonomy or custom post type
- Disable featured image
- Making a custom help center page
- How i can add ‘N’ page of ‘N’ pages under posts loop?
- create a template page for a post
- Page vs Custom Post Types Differences/Issues
- the_content() not outputting anything (Advanced Custom Fields)
- 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?
- Trouble with CPT Child 404
- Database to page routing API?
- 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
- Static page determines as home, but it is not
- the_content filter on some post types only not working
- Show Custom Post Type meta boxes only on Page Edit
- Adding the_content() in custom template email
- 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
- Is it better to use filter for the_content in archive pages?
- Top Level pages in wordpress giving 404, but child pages working fine
- Page for custom post type
- Why does not this wp_redirect work in is_single()?
- Why is get_pages() returning a boolean?
- Pros and cons of a custom page vs custom post type template file
- 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
- How to display data with pagaination on backend?
- 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?
- Excerpt for each post type and for is_front_page
- How to Associate Posts with Pages
- Programmatically Split A Post Into Multiple Pages
- Why are my wp urls showing page not found?
- query_post while (have post) get_template_part()?
- “regular” pages not found after changing permalink
- 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
- Why using archive pages at all?
- Subpage for Custom Post Type