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?
- 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
- CPT category hierarchy
- How can I set the page template of a new custom post type post?
- Custom post type pages return 404 page?
- Create Custom Post Type as page
- Multiple single templates?
- Custom URL redirect in WP
- WordPress Picks Up Wrong Template for Custom Post Type Archive Page
- Associate page w/ specific single post template?
- retrieve permalinks of posts inside custom post type by using post ID
- Include php on a specific page template
- get comments by current user inside page template
- page template for custom post type
- Page Template Dropdown For Custom Post Types
- How does: /index.php?post_type=event&event-date=2011-07-25 work? What if it doesn’t work?
- How to integrate single and archive templates for custom post type in any WordPress theme
- How to create connection among state, city, store and store number based on URL
- custom endpoints on Custom Post Type return 404 page not found
- Custom Post Type Category URL
- providing access to post_id or post inside functions.php
- wp_get_canonical_url showing first url of the post for custom page
- Custom page for editing custom post type on frontend based on url
- How to create custom search result page with custom URL parameters for custom post type?
- Dynamic assign a custom template to custom post type posts
- How to get the current category with custom posts
- Sanitize title only if only custom post type
- link featured image to external link
- 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?
- Changing custom post type URL issue
- Custom permalink structure for remote content pages
- Enabling permalinks disables custom page template
- Custom Post Type Specific Post Template
- Mixing Custom Post Types and Page Templates in WordPress 3.7.1
- Custom Post Type URL Rewrite’s
- Custom Post Type Template Insert not working properply
- Post/Custom Post Type URL Access
- Loop and add Specific Categories and Products Images
- custom post template ignored after altering permalinks
- Custom Post Type page template doesn’t show up
- How can I allow users to edit text that will be displayed on a custom post type archive page?
- Using get_terms() to list terms from one custom taxonomy AND from one specific built-in category
- Display ONE taxonomy and its assigned pages
- Display custom post type from template
- Custom post type items open in archives?
- Problem with custom loop navigation inside the blog page
- WordPress giving me the index
- returning the currect URL for nested posts
- 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
- How To Display Posts Of Custom Post Type At Page Template
- 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
- Modify Custom Post Type Slug
- How do I find out which (page) template file my custom child post is looking for?
- URL for archive of custom post type with 2 taxonomy terms
- WordPress Page hierarchy ( parent is singular of custom post types slug ) is returning not found
- How can I create a button that when clicked populates a div with a list of foods that are checked as a certain type of ACF?
- Subpages URLs for Custom Post Type
- Custom post type not pulling CSS
- Set a template on a custom post in the plugin
- Query custom post type and custom field by URL parameters
- How can I use a custom template to load custom post type posts based on a post_meta value
- Modify Url for Edit Post Screen in Custom Post Type
- How can I use one instance of page.php to display different custom post types?
- Showing Custom Post Type with his templates on a custom page template
- Add %post_id% to slug of custom post type and prevent the “unique slug” thing that WP does?
- Displaying posts inside table having issues
- Turning archive templates to a page template maintaining the slug
- Question on templates
- CPT – Custom Text fields point to new url permalinks
- Custom post type option page template
- Custom post Query and WordPress Post Query Clash
- How can I load Template file from wordpress plugin
- WordPress Custom post type slug rewrite
- How can I find out what template is my custom post type using?
- How to manage a custom post type archive as a page?
- How to manage a custom post type archive as a page?
- Search custom post type result in same template page
- Unwanted URL with Custom Post Type
- Custom post type , page template not grabbing the page template
- Custom Post – additional param in the custom post URL goes to error page
- Single Post (CPT) in two pages – Normal and Extended
- Remove wp directory and slug for custom post type from the URLs
- What am I doing wrong with my taxonomy?
- Show index and not the archive for “Dog Custom Post” with default slug
- WordPress custom post type and page
- Ordering Posts List By Taxonomy Terms?