To use page.php
specifically, you can use the template_include
filter.
You could also copy page.php
in your theme, saving it as single-foo.php
, and it would then be used for your “foo” CPT’s individual posts. You would want to do this in a custom or child theme rather than editing a parent theme directly, so that whenever your theme is updated, you don’t lose this edit.
Related Posts:
- How to add page under a custom post type?
- Remove slug from custom post type post URLs
- What are the differences between custom post type and custom page templates?
- Loading custom page template via plugin
- Ordering Posts List By Taxonomy Terms?
- WordPress keeps fetching the archive page instead of the template page
- How to add custom template in plugin?
- How to quickly switch custom post type singular template?
- WordPress Custom Post Type Category Page
- How to use a dedicated template for the Custom Post Type from a plugin?
- How to sort list of custom posts to get view like a tree of posts under categories and their children’s categories?
- Best Way to Leverage Custom Post Type Related Content and Consider SEO
- remove post-name from title in custom post type
- Custom Post Types, Page Templates and Pagination. Why do I get a 404 Error?
- Display Posts of a Category in Alphabetical Order (Custom Post Type)
- is_page_template not working as expected
- Multiple portfolios with one custom post type?
- Including Custom Post Type posts in a page template contextually (or should I widget?)
- How do I get the permalink structure to work like this?
- Can I make WordPress use a custom template for a child page
- Creating a Page to View the List of Posts for a Custom Post Type?
- How to load a template without it being assigned to a page/post?
- Custom Page that comes with preloaded content for the user
- Custom Post Type with Templates using Meta Boxes?
- Posts are duplicating on wp_post_update
- Custom-Posttype & Custom Taxonomy WP_Query
- Page template with different page and post content
- Custom Post Types, URL rewrite on multiple CPTs
- Remove the parent slug in a CPT URL
- Changing the search url according to language
- Adding sidebar to template creates horizontal gap the size of the side bar
- WordPress randomly shows 404 errors
- Show Custom Post Type meta boxes only on Page Edit
- Creating a Page Template to display all items from a Custom Post Type
- Filter widget outputs
- Custom Post Type Template Alternative
- General advice on addressing content-centric pages
- Multiple templates for single custom post type
- How do you create a custom template to display a category with an image and related posts below?
- Best structure / rewrite rules to achieve the following url
- WordPress Custom Search by post_type
- Pages Become “Archive” Instead of Using Page Template
- Custom post type pages return 404 page?
- Multiple single templates?
- Custom URL redirect in WP
- Associate page w/ specific single post template?
- page template for custom post type
- How to integrate single and archive templates for custom post type in any WordPress theme
- custom endpoints on Custom Post Type return 404 page not found
- Custom page for editing custom post type on frontend based on url
- How to display wp_post by custom field value?
- How do I display child post types in the parent post type template
- Custom post type URL
- How can I modify a custom post type and custom page template for a child theme if all content seams to be handled by theme’s ‘native’ plugin?
- Custom permalink structure for remote content pages
- Mixing Custom Post Types and Page Templates in WordPress 3.7.1
- Custom post type items open in archives?
- Problem with custom loop navigation inside the blog page
- WordPress giving me the index
- How to use pre_get_posts on archive page custom post type
- Can I automatically assign a page template to a custom post type (i.e page-slug.php file)
- how to achieve this permalink abc.com/CPTName/CustomPostTypeCategorySlug/categoryname
- Virtual page and loading template
- Custom Post type dont use custom page template (slug is not right)
- I want to rewrite the URL of a specific post with a specific custom field to easily analyze in Google Analytics
- How to change Elementor Template for Single Page Post on Load
- A certain theme is forcing it’s singular post layout
- How to create additional rendering for custom post types?
- Preview url not working outside wp-admin
- Set a template on a custom post in the plugin
- How can I use a custom template to load custom post type posts based on a post_meta value
- Question on templates
- Custom post type option page template
- Custom post Query and WordPress Post Query Clash
- How can I load Template file from wordpress plugin
- Custom Post – additional param in the custom post URL goes to error page
- Remove wp directory and slug for custom post type from the URLs
- What am I doing wrong with my taxonomy?
- WordPress custom post type and page
- Ordering Posts List By Taxonomy Terms?
- Loading a template for a URL pattern
- Custom Homepage As Single Page or Custom Post Type?
- Templates list in “Page Attributes” metabox is inaccurate
- Stop Custom post type from being searched via URL
- Custom Post Type & Page Template
- Why is a custom post type’s URL “/?cposts=name-of-the-post” but default post’s URL is “/?p=ID”?
- Custom Post Type Categories Not Maintaining URL structure any more
- remove custom post type ulr
- Category slug not showing for Custom Post Type
- Why are my wp urls showing page not found?
- Sorting custom post types by taxonomy (So close)
- How do I paginate a custom post type listing on a custom template page?
- Custom Post Type order Title ASC
- get tags from custom post type
- Creating additional page with own URL for each custom post
- Custom Post Type Template Based on Page Slug?
- img src not working correctly in custom post type
- Menu Structure and URL structure, with Pages and Post-Type-Posts
- I want to show a list of post with title that have link goes to that post and icon under the specific category to which it belongs
- Change post-name when inserting new Post if Specific Category is selected in WP