I think this approach will work.
1.create template for single post like singlepost.php
( default single post template),singlepost-99.php
,singlepost-101.php
.
2.now put just this code in single.php
<?php
global $post;
get_template_part('singlepost',$post->ID);
?>
what this code does check for single post template for current post by post id if not found call singlepost.php
.
Important Link:
Related Posts:
- custom single.php not working
- How to display different single post template based on author?
- What is the filter or hook to add admin controls to posts on the front end?
- 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
- How to detect single.php (but not single-portfolio.php)?
- Apply the_title() filter in post & page title, but not in menu title
- Update post counts (published, draft, unattached) in admin interface
- Removing any and all inline styles from the_content()
- Post/Page Preview Template
- Custom Single Post By Category
- Removing filter dropdown in posts table (in this case Yoast SEO)
- Get old values for post before saving new ones
- Using single.php from plugin folder instead of default template folder
- How to get Images included in Post
- How does filter the_posts work?
- Custom permalink structure only for default posts
- Related Posts by Multiple Tags?
- How to publish a post with empty title and empty content?
- How do I create a link that will always show the latest post?
- How to add a “publish” link to the quick actions
- My ‘post attributes’ is missing from my WordPress install
- posts page – different lengths of excerpt
- Why is wordpress removing some unicode characters (e.g. some emojis) when I save my post?
- Post X of Y in single.php / sidebar.php
- HTML code in Custom field
- how to display post content without post image?
- Forcing oembeds to top of post
- Exclude category on blog list page
- How to remove_filter that filters iframes in posts? [duplicate]
- Filter posts by author and category simultaneously
- Accessing $post variable from template part
- How to have different content in the loop and single
- Single.php Active Category Class
- Filter post before *editing*
- how to show all post in my page-grid.php template page
- Filter/Remove HTML Elements on all posts and pages
- Problem getting single_template filter to work – I want to serve a different single.php file for posts in a certain category
- Use template of parent category for single post sub-categories
- loop not displaying posts on custom template page
- How to add shortcode tags in single.php [closed]
- get_terms parent for current product only
- Including text at the end of every post
- how “manage_posts_custom_column” action hook relate to “manage_${post_type}_columns” filter hook?
- Adding variable for post title so post template can include auto-generated link to view on external website.com/{post title}
- If specific user role then sticky post
- How only display all post related to category
- Is it possible to have two different previews of a post (ie. two templates for one post)?
- how load content as pop-up using ajax
- Disable single post page
- how to know if the post has pagination () or not
- Remove arrows from previous and next link
- Getting post id from wp_insert_post_data function?
- the_posts filter been called multiple time
- Filter Posts By Tag
- Display page content AFTER a loop of posts
- Custom excerpt length filter doesn’t work
- Different template for posts of all subcategories of category
- “next_posts_link” and “previous_posts_link” display me NOTHING
- How can i do something after head like adding a hook for after head but before post
- Only display posts after current date
- Amend wordpress password function
- How to disable single post view in wp
- Add code just after Post content
- Single post as homepage?
- Pagination on single post page?
- Templating of a specific post ID
- How can I remove posts of a certain category from homepage after a specified time period?
- How to generate numbers indistinguishable for the IDs of the posts
- Modify WP_Post before processing
- Restrict post navigation to current sub menu
- How to filter posts that belong to a specific category only if that is the only category
- Category Template: Need to display different content on first page of archives
- Change post_date to post_modified date on post template?
- How to retrieve the postID in a “image_send_to_editor” hook function?
- Can’t get the_content of the parent page from its single post?
- Filter Custom Post Type by Category with Ajax
- What part of template to edit to remove category name from the top of posts?
- Ajax posts filter by date, comments, top views, top likes
- Show all posts in sidebar in single.php
- How to add Tags Filter in wordpress admin dashboard
- pre_get_posts query between 2 dates (date stored in custom post meta)
- Applying $posts_clauses filter to specific queries only
- how to remove dash (-) post status from post title on posts listing page wordpress
- Admin Posts Table Column Fitlering is not working for Custom Post Type
- Get latest posts from WordPress site without header, menu and sidebar
- Modify Image Source With The_Content Filter?
- 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
- Setting posts_per_page for taxonomy term template
- Change post order random through out the entire WordPress
- use wpml_post_language_details function other plugin based on $post->ID [closed]
- How to hide html tags on revision comparison pages?
- Add filter by custom field to block of posts
- Ajax post filters not working