This can be achieved using a Virtual Post. See this link on how to do it. https://ashiqur.com/how-to-add-a-virtual-page-in-wordpress/
Related Posts:
- Include a file before current template file
- Proper Way to Enqueue CSS for Front Page – template_redirect in functions.php?
- Redirect not logged in users if they are on a specific page and category
- I want to replace after WordPress is completely loaded
- How to add a switch to admin area which enables/disables crisis-mode: Redirect all traffic to certain page if switch is enabled
- template_redirect called twice
- Custom template redirect based on url vars
- Creating FPDF directly in the browser using template_rediect
- Load a specific post if user tries to access 404 page
- Redirect wp-sitemap.xml not working
- How to create custom URL routes?
- single-{$post_type}-{slug}.php for custom post types
- Custom Post Types and template_redirect
- template_include (overriding default plugin templates via current theme)
- How do I redirect /search/ to wordpress search template?
- Proper method to restrict non logged users into certain pages
- Want to redirect if search query match exact title of any post
- stop redirection on /wp-admin call to /wp-login
- WordPress multisite,several different languages,page redirect?
- redirect wp-login.php to another page
- Where does the 404 redirection happen?
- template_redirect to accompany with a shortcode
- How to identifty post from its URL in 404 page?
- Custom pagination structure
- wp_head() not including styles and javascripts after a template redirect
- Redirect the single product page link to the shop page
- How to correctly detect accessing wp-content/uploads?
- Change template dynamically
- Are Category or Tag Archive Pages Possible?
- Redirect all child taxonomy to its parent
- Redirect specific page in WordPress for first time visit
- how to block direct access to multiple thank you pages?
- Template redirect template loaded, but the header 404
- Serve specific “template” page at any URL that ends in its slug
- Adding rewrite rule dynamically for search results redirecting to 404 URL
- Redirect custom post type category to other custom post type category
- wp_redirect on base wp-admin and login
- Setup template_redirect using has_term when NO term assigned
- How do I determine what is causing a redirect for a given page?
- Why does my URL rewriting only work using two different methods?
- How to pass a message using template_redirect
- URL rewriting with custom user meta “/%shop_name%/gallery/%gallery%”
- Force HTTPS 301 redirect with hook
- Pre-Populate $wp_query settings with custom rewrite rules and custom template_redirect
- Common single page template options
- Different Template based on HTTP Referer
- !is_admin() condition turns true in admin pages
- How should I approach changing the template & $query as part of a shortcode’s execution?
- How to override a query and display specific page by ID?
- Why does the $_GET parameter ?search forward the front-page to the archive/blog page
- make permalink go to a custom single.php file
- Default taxonomy template in plugin, override in theme
- Page get parameter doesn’t work with is_single() function
- wp_enqueue_style on template_redirect level?
- How can I create custom URL routes?
- Custom URL routes
- Redirect to first child in menu
- How to redirect home page to another page after login for all user?
- how to show post content with post name in sidebar?
- Template Redirect to /2015 to use page template
- how to load posts to a custom post template after using template_redirect or template_include
- Template_redirect for child custom post types
- Page that links to category content
- Call another page in forms
- Redirect returning users to a certain page?
- Add code to template dynamically
- How can recognize post’s category?
- Category link redirect to custom template page instead of index.php?
- send popup after wp_redirect()
- Trying to re-direct users to specific page based on an ACF variable
- How to make WordPress search page use a relative path
- Template_redirect works, but headers aren’t sent when checking via cURL
- auth_redirect() doesn’t send users to the page where they orginally tried to acces
- Custom Login page, redirection and restrictions
- Redirect Users who aren’t logged in, aren’t post authors and aren’t admin. Frontend
- using add_filter in a template_redirect function?
- How to redirect to category page if page does not exists?
- Intercept loading of a certain page
- Detect if requested page is PWA on server side
- Redirect logged in users from a custom post type archive page if they don’t have a specific role
- Template includes
- Polylang will not allow changing of language without translation
- WooCommerce – template_redirect if is_checkout AND order has been paid?
- Redirect user to a custom url after logged in
- How to redirect (301) trashed post to it’s parent taxonomy TERM ARCHIVE instead of 404 page
- Internal redirect from page to category
- wp-admin redirects to standard wordpress page
- redirect_to not Including Hashtag from URL
- force download a file in template_redirect hook
- template_redirect() doesn’t seem to be working
- How to check if the user was redirected?
- template_redirect and title
- Google indexed pages for one page site
- Add custom content to nonexistent page
- Adding a query var to taxonomy term archive – gets redirected to the other taxonomy archive page
- What hooks, actions or filters i can use to customize wordpress registration page and form?
- Redirect to a subdirectory frontpage using without using a WP plugin- what files to edit, and how?
- redirect not logged in users to specific page and redirect them back where they come from
- Redirect drafted post of custom post type to URL?
- Cannot find redirect – WordPress behind HTTPS proxy (Cloudfront)