Finally, I’ve found the solution by myself.
There is a the_posts filter hook we have in the WordPress, which works after the system attempted to collect posts from a blog and, the most important, before defining the 404. Hooking it we can quickly update, or even modify, the array of posts, i.e. single post in my case, thus giving the system to continue working as nothing happened.
Due to that matter I’ve placed on the github the code of that tiny plugin and README with some explanations. If somebody will think that plugin should leave for the public audience, I would like to kindly ask to tell me about it, to continue development. Future ideas have been already placed in README.
Related Posts:
- How to Display Network Post Count?
- How to cache a shortcode functions output?
- Querying post from a multisite network
- How to get a post content from another wordpress blog/site?
- how to enable different number of revisions for different blogs when using WPMU?
- 404 error after publishing a post
- Strange switch_to_blog() issue
- Some posts returning 404 instead of displaying post
- Custom post type single (permalink) throws a 404 error
- How to hook a function only when I need to delete permanently a post?
- Unable to modify(update) posts – Page not found
- How to share same post to multiple site in wordpress?
- How to create post in WP network using WP-CLI
- Debugging WP routing
- Pull posts from another wordpress install on same server
- Query posts from different categories in multisite
- PHP Notice error (when on 404 page)
- Getting a 404 error when clicking edit page
- Multisite – Get current post id
- How to show last post of each website of a MU wordpress in HomePage
- 404 on paginated blog pages
- Multisite: Can’t Post or Create Categories
- Unable to restore from backup – how to obtain old blog posts?
- Pagination with an array of post objects?
- Why does my site often display 404 on subpages?
- WordPress Multisite – Create Default Post and New Category On New Site Install
- custom post template file not shown, instead all the time 404.php
- Set static page/post from another blog on same network
- One post on my website is going to a 404 page
- How do I locate the exact location where this error is occurring 404 page not found
- 404 error on default post type and default taxonomy fronted page
- Problems with Page Not Found
- How to WP_Query() from multiple blogs and order them?
- Is it possible to filter the main loop to exclude posts from a specific category?
- How do I show posts from another wordpress installation?
- Display password protected posts to logged in users
- Posts and Pages: 404 Page not found
- Change Author Name to Sitename on Frontend
- If post does not exist, do something
- Cannot select certain authors for posts after import
- why the posts queried from sql is more than those showed on the page?
- Prevent 404 of Author pages without posts
- Prevent duplicate pages from being added
- unable to write to the database while uploading images
- Displaying all posts from other sites on the network on one site
- Multisite how to display merged posts from two sites and sort by latest date?
- Multisite Issue on Subdomain’s article pages
- Populate a drop down list with post titles across a multisite network
- including 404 page in post page
- How can I have the posts from one word press blog show on the presentation page of another word press site
- How to get posts from network blog
- 404 error on every post and page other than home
- Sorting Posts by Date – get_blogs_of_user_id()
- Users cannot post when editor or admin on more than 1 site on multisite
- How to link two news page multilingual press
- Get post title of faulty link on 404 error page
- Get image paths from RSS feeds
- making a few sites in wordpress
- Getting 404 when using rewrite rule for posts
- Password-protected Posts lead to 404 Error
- Cannot Create a new Post [closed]
- Do I need to create a multisite for querying posts from multiple WordPress sites?
- Site ‘Categories’: save an admin global setting with post metadata [closed]
- users followin the blog post author
- Post pages are redirecting to the 404 page in wordpress
- Redirection – bulk edit 404s to new tomain
- Add custom Attachment Display Setting for images
- Rewriting post slug before post save
- Getting the post_id in wp_ajax function
- Replacing all attachment links in post with media file link
- Change the default number of posts to show on mobile version
- Post content being duplicated by the_content();
- How can I pass $post object to ‘save_post’ add_action?
- 1 column admin screen options – move submitdiv to bottom
- Add confirmation popup on “Move to Trash”
- Insert posts in two tables
- How To Keep Posts from Being Displayed Two or More Times on My Homepage? [closed]
- custom wordpress post loop – hide iframe content
- Different template for posts of all subcategories of category
- Add custom field automatically (add_post_meta) with value based on number of words of article
- How to access featured image?
- Mark menu item as current-menu-item for category
- Post revisions disappeared (for some posts)
- Replace ‘published on date’ with ‘modified on date’ on Posts
- How to display category from recent posts?
- Best way to assign post position in a news site homepage? (no categories, no sticky posts)
- How do I restart my loop with get_next_post()?
- How do I use WP_Query to get a range of posts with custom fields that have numbers with letters in them?
- “Duplicate” Posts Appearing Since 3.1.2 Update
- Rename “post” to “article” throughout the admin back end [duplicate]
- Setup a custom dynamic post
- Can I search posts and pages for css classes?
- minimum requirement to add posts via database
- Delete and perform a fresh install of WordPress
- Need to remove duplication content on home page in wordpress theme
- How safe is renovating $wp_query when doing WP_Query pagination in Page Template
- How to show full post?
- The WordPress wp_posts data table
- How to automatically convert a form with HTML link into post
- How to display breadcrumb on category?