If you want to change the single page
page-{page-slug}
is a good choice if you want the page template for specific page only and not multiple pages.
Check out his custom page template for specific page
If you are talking about custom post type
We can use single-$posttype.php
, here $posttype
is your custom post type slug.
WordPress template Hierarchy for single post page’s custom post is in the order of :
single-$posttype.php ==> single.php ==> singular.php(WP 4.3+)
So if a custom post single page is requested, WP first looks for single-$posttype
file if it’s available it uses that file else it goes to single.php
and so on as the above order.
Refer to Template Hierarchy for more details.
Related Posts:
- Hook for post and page load
- Searching multiple custom post types and pages
- previous_post_link() and next_post_link() with a custom post type?
- Setting a custom sub-path for blog without using pages?
- Get page by template?
- Custom Posts on Different Pages
- Display “Post 2 of 4” on single post page?
- Making pages also serve as taxonomies? Or give full pages to taxonomies?
- How i can add ‘N’ page of ‘N’ pages under posts loop?
- Allow non-logged in users to see a future post after clicking on a list of future posts
- No Permission to add new Page, Post or CPT with Admin role
- Including link to custom post type in ‘wp_list_pages’ function
- Multiple pages per post (not pagination)
- Can I change my post type to anything and my site still work?
- Display an authors post on a single page only when they are logged in
- Creating separate feeds for custom post types
- How to set the mainpage of a custom post type?
- Render a Post or Page using the correct file
- Template code to split a post and print a custom field?
- Setting a homepage – doesn’t seem to work
- Am I mixing up the concept of posts pages and categories?
- How to setup different permlalinks for posts and pages?
- Tag template not returning posts [closed]
- Does “Custom Post Type” can have page hierarhy option?
- Post template with breadcrumb needs to show page navigated from
- Post template not applying on theme (potentially rendering as Page template)
- Add custom template ‘sub-page’ to Custom Post type?
- Cannot save pages after migration
- Assign for all post of a post type a specific single-post template
- WordPress Contents Migration
- Custom post type with two templates
- One Post with different content, depending on a Page
- Why isn’t my custom post type using the corresponding custom post template?
- Cannot use pages created on WP
- Different post types arranged on one page
- How to display data with pagaination on backend?
- Search page for custom post type
- How to Associate Posts with Pages
- Why are my wp urls showing page not found?
- query_post while (have post) get_template_part()?
- Using custom post types within a section of a template
- How to make a template for a specific post of a custom post type?
- Apply text based styling done for a single post in WPBakery to all posts / create a template out of it [closed]
- How do I hide single category post on my post page
- Include custom post type single template, but respect theme override of template if it exists
- How to add post_type=value when editing that post type in the WordPress admin?
- Custom template page with custom archives listing by user
- Custom post type not using custom template
- Adding dropdown select meta box to custom post type – seems restAPI is interfering
- Custom Post Type template stored in plugin folder not showing in post attributes dropdown
- Open Custom Post Type as PDF
- Using The REST API How To Pull All Custom Posts?
- Making a custom help center page
- Set up Custom-Post-Type Author Archive
- create a template page for a post
- Show the same Article Available in Other Categories
- Getting posts under the custom post type ui category
- How to clone the “Projects” Custom Post type in Divi theme
- Page vs Custom Post Types Differences/Issues
- Storing posts from query and accessing later via AJAX call
- If post has custom field then display css-class
- Display only one post each WEEK
- List children on child post
- Restrict custom post type from appearing with ?post_types=
- Show custom post type filtered by category
- create parent post using wp_insert_post
- Turn on and off custom post type from admin?
- Missing Posts in Custom Taxonomy List
- How can I pass the ID of a post to a page template by clicking a url?
- Display random posts, but omit the post it is on?
- Query with no terms uses index.php template instead of archive.php
- How do I do this with WordPress? Taxonomies?
- Disable block with taxonomies at post page
- I would like to have different styles for my posts based on the content of each post
- How can i add thumbnails images to particular post (using code not admin pannel) in wordpress
- Create template for taxonomy results limited by Custom Post Type
- Showing posts from different categories and from custom post type
- Get latest 3 posts from multiple CPT in one query
- Template for custom post with custom taxonomy
- WordPress Custom Post Type Children Template
- Which post does a taxonomy term belongs to?
- Getting template_include to work when allow_url_include is off?
- List custom taxonomy specific to one custom post type
- Post image in WordPress not appearing on home page
- Exclude pages in archives results
- How to add a custom-post-type post within another custom-post-type post edit screen using AJAX?
- Custom post type content using custom fields without template
- Meta query for custom post type ignored in main query
- Changing custom type name hides the posts
- Display Ad on Specific Categories
- Make parts of your wordpress website completely built with data from external APIs?
- Hiding posts by other users and non-logged in
- 2 Templates 1 custom post type according url
- Update Post Meta for a logged in user
- Add custom field to Posts and sort by it
- Add custom post type settings to wordress default posts
- Trouble with CPT Child 404
- Database to page routing API?
- Get related posts of child term of custom post type
- Two Custom Post Types Many to Many Relationship