Posted: January 8, 2019 at 5:06 pm
We noticed there is a page which shows archived events located on a page called “event-category” which I am not sure where it is coming from. Is there a way to disable or hide this page from the public and search results? |
|
Hi, That’s a WordPress taxonomy archive. Event Espresso events are a WordPress post type, and the event post type supports having categories (actually a custom taxonomy). So WordPress adds a taxonomy archive, and that’s where that comes from. You can disable the taxonomy archive by adding the following code to your site:
You can add the above to a functions plugin or, if available, into your WordPress child theme’s functions.php file. |
|
Got it! Thank you Josh Do you know what the value would be for the “venues” page as well? |
|
I’m not sure I follow your follow up question. Are you asking me what is the value of having a page that lists venues? It might be useful if someone is trying to find information about the locations where the events are held. If you’re asking how to remove that list, then you could add some additional custom code to unset the archive, but you’ll avoid 404 errors if you add a redirect to another page on your site. e.g. if you have a page on your site that shows a list of locations, and its url is /locations/, you can add a redirect for /venues/ to /locations/. |
|
Sorry Josh. There is also a page that exist similarly to the following: https://www.mywebsite.com/venues/… I would also want to hide or remove this page as well. Would I be able to do something like this? add_action( |
|
Hi Josh, ignore that last question. I think we are okay with the /venues/ page being shown. The code snippet you provided worked great! Thank you very much for the help! |
|
The support post ‘Hide the event-category page from public view’ 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.