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
- Post type gives 404 unless logged in
- Unable to create categories and tags for posts in wordpress multisite
- Get WordPress post content by post id
- Get page ID of page that is set as the posts page
- Get Posts Under Custom Taxonomy
- How to limit the number of posts that WP_Query gets?
- Stop WordPress Wrapping Images In A “P” Tag
- When is the ‘post_content_filtered’ column in database cleared by WordPress?
- Turn a URL into an Attachment / Post ID
- GET the excerpt by ID
- Stop WordPress automatically adding tags to post content
- Determine if page is the Posts Page
- How to get ‘post_content’ without stripping tags?
- How to add an admin notice upon post save/update
- Print Current Post Index number within Loop
- Should we trust the post globals?
- Optimize post insert and delete for bulk operations?
- Get the Current Page Number
- How do you add thumbnail support for custom post types?
- How to mark every 3rd post
- Change Posts per page count
- Keep featured content post in homepage with original order
- How to display related posts from same category?
- Can posts have parents?
- Is there a action hook for the “Empty Trash” button?
- How to end the excerpt with a sentence rather than a word?
- How do I check if I linked to a post before I delete it?
- How to change the case of all post titles to “Title Case”
- Appending content with broken in 4.4
- How to get posts published between a date and today?
- ZIP up all images displayed in a [gallery] and offer as download link
- How to detect single.php (but not single-portfolio.php)?
- How to check if post meta key exists or not in wordpress database
- How to remove a column from the Posts page