Posted: July 25, 2017 at 7:55 am
|
Hi, We have successfully stopped expired events from displaying in the event lists, but if a user has bookmarked the page, or otherwise accesses the event though the url then they can see the event. This is causing confusion because they want to try and book for the past event! Is there any way to prevent an expired event from displaying and instead show a message for them to navigate to the current events’ list? Alternatively, if we can’t prevent display, is there any way that we can show a message in place of the tickets to tell them that the event is expired, and give them a link to the current events’ page? The ticket selector does not show on the expired events, but I can’t work out how to display a custom message in its place. Thanks in advance |
Hi there, Yes there are ways but in order to help you with this I need some clarification of what you mean by an expired event. For example do you consider this to be an expired event: An event where the ticket sales are done, but the event hasn’t happened yet? |
|
|
Hi, This is an event from last year – as you can see the tickets title is visible, but the tickets are not. Our problem is that people are accessing this page (not quite sure how) and then trying to book but don’t realise that they can’t because the event is in the past. What we want to do is display a message underneath the tickets title which says that the event has finished, and direct them to the current list of events. |
I checked your site and there are a few improvements that can be made with regards to the SEO plugin adding the expired events to the XML sitemap. So the first thing I can recommend is those should get removed from the XML sitemap. This can be done automatically by adding some code to your site. Here’s a link to a gist: https://gist.github.com/joshfeck/85dcc9947b8f406093498464f542e990 Here’s a link to another code example that can be used to set a “noindex” on the robots meta tag. This will also make it so these expired events are less findable: https://gist.github.com/joshfeck/70979dc12f93ab25dd668ed4500be477 You can add the above to a functions plugin or into your WordPress theme’s functions.php file. It appears that your site uses custom templates to display the Ticket information (reason being there’s an |
|
|
Here’s the code for the event display Thanks |
OK thank you. Right after line 68 where you have: You can add this to display the custom message:
|
|
The support post ‘Expired events can still be viewed’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.