In the Content Template, we need to have a redirect to a page if the logged in user ID does not match the post ID.
It is essential that a logged in user ID (client) can only ever see their own Post ID (booking), and if they try and change the post ID, they see the page we have created.
Just now we use this conditional statement:
<!-- wp:html -->
[wpv-conditional if=" ( ( '[wpv-current-user info='id']' ne '[wpv-post-author format='meta' meta='ID' ]' ) ) "]<div class="jump" id="details">
<h2 class="general-page-content">Page Unavailable</h2>
<hr class="general-page-content">
<div class="general-pages">
<p class="general-page-content">
Please note you can only view your own bookings and muct be logged in with your unique booking reference.<br><br>Please click here to return to the previous page or hidden link">click here to return to the login page. </p>
<p class="general-page-content">Thank you</p>
</div></div>
[/wpv-conditional]
<!-- /wp:html -->
Which dynamically displays the messahe with a couple of links.
However the menu does not work and also the logo (home page) has been disabled, and therefore it could cause confusion. Because if the logged in user ID and Post ID match the entire content template is displayed and then the menu anchor points work correctly.
So, we would like to just redirect to hidden link with a redirect shortcode to replace the code we are using above.
This way, there is a common page for everything on the WebApp if the user and post ID are a mismatch.
Thanks for getting back to me, and my understanding is that because we are wanting the 'redirect' from within a Toolset Content Template and activated via a conditional statement, we need a Toolset Shortcode Redirect, which is linked to a bit of code in the functions.php file? We can then add the shortcode in place of the message at the top of the Content template.
So, the scenario we have is that a user, say 221234 (for simplicity we are using their event booking reference as their username/ID) logs in correctly and checks their booking, which is post 221234 - this is all OK and what we'd expect.
However they decide to change the browser URL to another booking ID, say 221533.
We currently block them from doing this and with a conditional statement display the message at the top of the Content Template code.
However doing it this way, still displays the logo and mobile menu, which now doesn't work, because the 'anchor' points are not loaded.
So, what we want to do is 'redirect' them to /page-unavailable/ which does not have the menu (blank header) and and not sure the WP Standard Hook will work in this scenario because it is not linked to he Toolset Content Template.