They do not differ technically. These files exist in your theme directory and the template that loads is determined by the following: If you have a product with slug of dmc-12, then WordPress will first look for a file called single-product-dmc-12.php
in the theme directory. If it finds it it will use that template when creating the page. If this file does not exist, then it will look for a file called single-product.php
in the theme directory. If that file does not exist, then WordPress will look for a file called single.php
in the theme directory.
Related Posts:
- Loading partial templates with AJAX/PJAX
- Templates & CSS – Proper Programming Practice?
- index.php template is used instead of blog page
- Load template file without a post type
- How to apply a custom template for posts by default?
- Unable to include a template
- What should I put on my index.php?
- When a link doesn’t exist, how to tell WordPress what to do? (404 Error Page)
- Is there a way to set different post templates for parent posts and child posts in the same post type?
- Having trouble with Template hierarchy. I Need to create a set of pages that drill down from states to specific locations
- Custom templates vs page-slug
- Understanding the Template hierarchy
- How does WordPress choose archive type template?
- Use one template only for custom post type archives?
- get_month_link uses what wordpress template?
- Differentiation between index.php and page.php
- Single-page.php template file name not shown
- Can I assign a Folder for Post Formats, without it affecting WordPress’ fallback/hierarchical system?
- How to display custom post type?
- Assigning custom page templates to a static blog page
- Archive-custome_post.php template not working
- Organize template parts and page templates in folders in regards of template hierarchy
- Help Understanding Template Hierarchy
- User role templates
- Assign template to custom page type?
- BuddyPress : how can I call the template WordPress would have chosen (template hierarchy)?
- How can I make custom page templates work on child theme?
- Which template(s) to override to use a different sidebar for blog, single posts, categories, blog archive?
- Page Templates Used in Custom Post Type
- Show a custom template, no matter the page being viewed, if the user is not logged in
- Unload templates; disable parent Template Parts using only “theme.json”
- How to use Class
in Java? - Is there any way to use get_template_part() with folders?
- How to edit contents of dynamic_sidebar()?
- A special single page templates for posts under a category and all its child category
- Where to store some per-template preferences?
- How do I override template-tags.php in twentyseventeen theme
- roots child theme can’t override header.php
- Custom Post Type with Nested Taxonomy and Template Files
- Stream Video Player does not work with do_shortcode()?
- Which has more impact on site performance? Template overrides or hooks
- Advanced Custom Fields – display when specific template used?
- How To Create WooCommerce Custom Template For Specific Product?
- How to Use Twig + Timber with Multiple Loops based on Meta Key Value
- Programatically create a page
- Missing .twig files in wordpress theme editor
- How to custom page template for the Gutenberg editor
- Use PHP templates as blocks
- Directly using pure JWPlayer JS (but NOT WP Plugin)
- Login page theming?
- I want to add a custom “all posts by author” by authors name. How?
- Advanced templating / WordPress as a CMS questions
- displaying category and subject posts
- How to duplicate a page template but make minor changes to the header?
- get_template_directory() still returning path to previous theme
- URL / Templating system advice [closed]
- What’s the purpose of $wp_did_header?
- Trying to display short code content in template file with do_shortcode()
- Unable to add template to page set as Posts page in WP V 4.6.1
- How to use index.php as a template for archives?
- How to customize WooCommerce templates to avoid override upon update [closed]
- single.php with different look by category
- Creating new content types (Pages, posts, testimonials, tigers, oh my!)
- Dynamically Insert Image Into Stylesheet
- How to access .html file that’s located in the theme folder from the browser?
- Way to use one template but be able to call different top graphics?
- Differnt page template for page 2 of blog feed
- How to implement my custom development multiple PHP page work into WordPress?
- Create template for just a print
- dynamic_sidebar() stopped working
- Index template always follows page_template() template?
- What Must to Display the “mysite.com/category” URL?
- WP overwrites my setup_postdata() setup
- wp_list_authors() returning the wrong member url
- Sending email for the custom form in WordPress
- Hard Coding Components on a Client Specific Websites
- How to use another file instead of home.php
- Can i exclude certain page templates for a specific role?
- Template_redirect for child custom post types
- Using a specific template for front page only
- WordPress hierarchy clarification, does post_type_archive take precedence over taxonomy-term archive?
- Child theme enqueueing style.min.css not style.css
- Exclude certain template from wp_list_pages
- Why wordpress custom template comments shows Undefined index?
- How to add variables to a template
- Update body class based on theme as well as a html attribute
- Is it possible to set a custom post type template with code?
- Fix for Chart.js removing Admin Bar
- Why is this array not working?
- Display different list of “Custom Templates” for each Custom Page Type
- Submit form to another template (ugly url)
- Using file outside of template hierarchy for Twitter sign in authentication
- List all pages using a specific template on a page
- Duplicated Template Does Not Load the Same as the Original Template File?
- Blog template PHP [closed]
- load_textdomain won’t load my .mo file
- why does blog page ignore template [closed]
- html blog template to wordpress template
- templates page not showing on gutenberg editor
- How to load php templates from html page (block theme)