Read Template Hierarchy article in the codex, especially pay attention to Single Post Display part.
As you can see you have only three options:
single-{post_type}.php
single.php
index.php
It means that you can’t create a template for posts related to blog
category. So you shouldn’t use single-blog.php
template, use single.php
instead and add there something like this:
<?php get_header(); ?>
<?php if ( has_category( 'blog' ) : ?>
<h1>TEST HERE</h1>
<?php else : ?>
<h1>Else posts</h1>
<?php endif; ?>
<?php get_footer(); ?>
Related Posts:
- How to display different single post template based on author?
- Custom Post Templates
- How to save template data into wp_post table (post_content column)
- How do I change the template specifically for single posts?
- 1 post, 2 templates
- Post/Page Preview Template
- Custom Single Post By Category
- Using single.php from plugin folder instead of default template folder
- How to get Images included in Post
- Custom permalink structure only for default posts
- Related Posts by Multiple Tags?
- My ‘post attributes’ is missing from my WordPress install
- posts page – different lengths of excerpt
- Post X of Y in single.php / sidebar.php
- Forcing oembeds to top of post
- Adding variable for post title so post template can include auto-generated link to view on external website.com/{post title}
- how load content as pop-up using ajax
- Display page content AFTER a loop of posts
- Add code just after Post content
- Single post as homepage?
- Pagination on single post page?
- Restrict post navigation to current sub menu
- Category Template: Need to display different content on first page of archives
- Change post_date to post_modified date on post template?
- How can I pass the ID of a post to a page template by clicking a url?
- How to show single post page as home page
- Using wp_list_categories like the the_category (showing just current categories of a post)
- How can I make a post that belongs to a category or have specific tags, display different from the other single posts?
- Display all posts that were published before full post on single.php
- Using custom post template
- What is the filter or hook to add admin controls to posts on the front end?
- Switch to page template when using post permalink
- Genesis + Ajax + Jquery | Failling to call action
- Add Read More Tag to a post content (Single.php)
- Get Page ID of blog homepage
- Send post id through ajax and get the post content back
- custom post template file not shown, instead all the time 404.php
- How to create a template for Pages?
- Insert sometext after first h3 in content
- Thumbnail Image to go in the post aswell
- Is it possible to customize the post according to post format in single.php?
- Hide a specific post from a page template
- Post type no single page
- how to set social icons to product / post template (Auros theme)? [closed]
- How to identify and hide/remove an element from a WordPress page [closed]
- wordpress posts template remove default template from menu
- Defined function isn’t showed on page
- showing posts of an specific category in admin custom menu with style of admin posts section
- get_previous_post() while accounting for sticky posts
- Give posts a particular template based on the assigned category
- Display a post via template
- Single post full screen template not inheriting WordPress role permission
- How to set a certain Custom Template to a Single Blog Post
- List all native posts in template page?
- Sidebar on single.php not showing up
- How to Featured content with images in home page?
- Changing wp_link_pages() to “Next Page” and “Previous Page” buttons?
- add_rewrite_rule and template redirect not working
- Making a wordpress page print friendly
- Can I style single post that are in multiple catergories?
- “Home” Page now only displaying the single latest post
- Custom post type and taxonomy page templates
- WordPress – When visiting a `single post/ single.php` my category menu item link becomes active
- How to allow WordPress to recognize a custom URL segment after a product URL and use a custom template?
- Show single post child category from a determined parent
- Post not using taxonomy template
- Customizing a new page used for blog posts with Avada theme
- WP posts using index.php instead of single.php
- Single post shows post three times
- Assign for all post of a post type a specific single-post template
- How do I check if a post is password protected?
- How to Display Most View Post in the template file?
- display multiple posts and posts content on a single URL
- Use special template for the first post in the loop
- Is it possible to query a category with specified posts?
- Get the category of post
- Only show related posts when another post has same term
- single- and archive- templates not being applied to custom post types, not even after flushing permalinks
- How to change post template via url?
- Custom Single Post Type not referring to single-post-type.php File
- My blog “page” used to show a list of posts, but now it’s just showing the page content?
- Custom template for different post types
- Thumbnail With Next/Prev Links Not Showing Next Post?
- Posts page template: How can I edit the markup for this?
- Pagination and Related Posts
- Single post page from static home not working
- Get current post’s child page?
- Which hooks are essential for post templates?
- Display the first post’s comments of category in comments.php template
- how to style an individual page in a category [duplicate]
- How to display a certain template element only for posts published within certain time range?
- Redirecting posts in WordPress to a specific page
- custom post type single page template not working
- Wrap div-tag around posts in page
- How to add a new page that will function as a separate blog/news article page
- Tag page that displays specific posts
- No matching template found when using single.php
- Is there a block to print post link standalone in a block theme?
- Show Next/Previous without Link
- How can I locate the single buddypress forum post template? [closed]