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
- Set posts of a custom post type to be private by default?
- How make get_next_post() return first post when viewing last one
- How can I add dropdown widget/box to admin post page?
- How to show related posts by category or custom post type?
- ascending order custom post type
- Display posts of child category in template
- Display taxonomy term only if there’s a value
- Create separate template for shared custom taxonomy with shared terms
- How to show post title outside of loop? [closed]
- How to delete all posts from a custom post type?
- Update content of multiple pages/posts at once?
- Display types of posts in edit.php instead of All, Published, Scheduled and Draft
- Check if admin is editing page or custom post type
- Deleting Custom Post type data using mySQL command
- Notice: Undefined index: suppress_filters
- Custom post type not using custom template
- Storing posts from query and accessing later via AJAX call
- If post has custom field then display css-class
- 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
- 2 Templates 1 custom post type according url
- custom post type category count shortcode
- Add post location with mile radius allowing search
- How to get all tags of a custom post type by id
- Why does not this wp_redirect work in is_single()?
- Create new custom post and post category of same name
- Load Next WordPress Posts With AJAX?
- Custom posts template page
- If there is only one post (show elements) else (show other elements)
- Add Previous/Next Buttons to CPT Single Pages Only
- Custom post type menu
- How do I edit the WordPress post.php file?
- how to redirect to a custom post template
- WP not recognizing custom post type / template
- My template won’t apply, theme still fallback to index.php
- One Custom Post Type two different Templates
- On click some element i want to use some template
- list articles in admin showing nested categories or slugs?
- Define multiple prefixes for custom post type
- order custom post type posts by custom date
- Accessing download link from the loop with WP Download Manager Pro
- How to show posts of the same category on a page?
- Need to display author’s email id in the “Edit post” field in wp dashboard. How do I do this?
- call a function when insert and update a custom post type
- Edit post meta direct from post.php?
- How to Arrange Support => Thumbnail
- Front-end form submission not creating post
- Load different template for CPT (in loop) in my plugin?
- Excerpt for each post type and for is_front_page
- Post being scheduled that shouldnt be schedulded
- Most appropriate way to display CPT’s by children terms of custom taxonomies while retaining desired permalink structure?
- CPT Template Option to Top
- show the most recent date of all posts to display on front end
- Custom post type is_singular condtional not working when managing sidebar display
- Sort ACF by custom taxonomy