It’s the nature of the WordPress template hierarchy – point being, if you don’t have a page.php
, it will use singular.php
, same if you don’t have single.php
, it will fallback to a template lower in the hierarchy.
Ideal for themes that have the same layout for posts/pages, instead of having duplicate code in each respective template.
Related Posts:
- Template for specific post of custom post type
- redirect automatic page that serves custom posttype content
- Associate page w/ specific single post template?
- Custom Post Type Specific Post Template
- WordPress giving me the index
- Custom Homepage As Single Page or Custom Post Type?
- How to disable the single view for a custom post type?
- Custom post type single page returns 404 error
- single-{$post_type}-{slug}.php for custom post types
- Custom post type single-{custom}.php not working
- Conditional for single-{post-type}.php
- Custom Post Type Plugin: Where Do I Put The Template?
- CPT Template Not Showing – Getting 404
- What are the differences between custom post type and custom page templates?
- Page Template as Custom Post Type Archive
- Setting a custom sub-path for blog without using pages?
- Add Content to Page without shortcodes
- Single custom post type page redirecting to 404 page
- Loading custom page template via plugin
- Multiple Single Post templates
- Post formats “audio” and “video” only showing in index.php
- Ordering Posts List By Taxonomy Terms?
- Display Editable Text Above CPT Archive Listings
- Creating a Custom Post Type for Inserting Preset Content into Post & Pages?
- WordPress keeps fetching the archive page instead of the template page
- Pre get posts for single post
- Pull Two Posts Into Custom Post Type `single-cpt.php`
- How to add custom template in plugin?
- is_singular() not working if called via callback function of admin-ajax.php
- How to quickly switch custom post type singular template?
- Disable Single Post View for Specific Taxonomy on Custom Post Type
- Add a Template to a custom post type
- How to use a dedicated template for the Custom Post Type from a plugin?
- WordPress calls archive page instead of Custom Page Template
- How do I Make a custom post type get a custom post template in a plugin
- How to sort list of custom posts to get view like a tree of posts under categories and their children’s categories?
- Is it possible to have an index page for taxonomy term for each custom post type it is assigned to?
- Assign Page Template Within A Custom Post Type
- Dynamic page.php template for custom post types
- Custom Post Type with Nested Taxonomy and Template Files
- Custom post type archive and single.php files not working
- How to get a list of term names of the custom post type im currently on in single.php
- is_singular won’t call my functions?
- Page Templates – this code only works for one Custom Post Type
- Create sub single pages
- Pagination on a custom page template
- Using previous_post_link and next_post_link to wrap around post sequence
- Custom Post Type – Archive page title
- How do I create new content pages for my Custom Post Type?
- WordPress custom post type Single.php?
- Multiple templates for custom post type
- Display “Post 2 of 4” on single post page?
- posts_nav_link on single post template
- How do I create a custom post type for a training CMS in WordPress?
- Post Rank on Single Post page based on custom field
- Disable single pages and archives and keep preview
- Archive or taxonomy pages not working for custom post type
- Single page template for custom post_type
- Displaying Meta Box Image
- Custom Post Types, Page Templates and Pagination. Why do I get a 404 Error?
- How do I create a page template to display a custom post type?
- Trying to manage templates on a blog with lots of custom taxonomies
- Custom template for post type not working
- How to make an archive page displaying posts in a date range
- Display Posts of a Category in Alphabetical Order (Custom Post Type)
- Make custom post type display as a page
- Custom Post Type slug same as page name causing a conflict
- WordPress Template Hierarchy
- Control Custom Post Type template from a plugin
- Detect if 1st, 2nd or 3rd level custom page?
- Create second custom 404 page for selected post type
- Rewrite Custom Post Type URL slug
- is_page_template not working as expected
- Child page in custom post throws 404 page not found
- CPT: archive-cpt.php VS custom page template
- Multiple portfolios with one custom post type?
- Take Variables Set in Functions.php and Echo Them Inside My Custom Post Template
- Hyphens instead of Underscores in Post-type Archive Template Filenames when Post-type handle contains underscore
- Disable single view in register_post_type [duplicate]
- Including Custom Post Type posts in a page template contextually (or should I widget?)
- Custom post type and taxonomy permalinks – Structure
- Help with CPT template pagination
- Custom Blog Post Listing in Genesis Sample Child Theme
- After updating a page, all pages on the site used the index.php template
- Archive page for custom post type not working
- Redirect Single Post CPT (Custom Post Type) to a specific URL
- Need post_type_archive_title function but in ‘single’
- Page Templates Drop Down Select for Custom Post Types
- Help splitting a custom post type archive into “past” and “upcoming”
- Pull in custom content types into page template
- Editable content on a Custom Archive page
- Using custom page templates with plugin [duplicate]
- Rewrite URL for only archive page (custom post type)
- pagination redirecting from page number url before page requested
- Can I make WordPress use a custom template for a child page
- Custom Taxonomy term archive template
- Troubles with making a custom template for posts
- How to check the terms in single custom post type template
- How to show the archive / post type description on Single templates
- Need to display same custom post type on 2 different singles templates