Posted: November 9, 2016 at 10:07 am
We are using WordPress 4.6.1 with EventEspresso 4.9.16.p
I did some searching and I found the following suggestion by one of your support staff: https://gist.github.com/lorenzocaum/117cb5c8a3b4e6a9deb1. Unfortunately I did not have any success with it. So I looked at the source code of our events page and I noticed that the div’s with the event content don’t seem to have any of the appropriate EventEspresso classes or IDs being set which is probably why it doesn’t work, right?
I don’t know if it’s related but in the WP admin panel when I go to EventEspresso > General Settings > Critical Pages and scroll down to Event List it says
So from that description it sounds like you are handing off the creation of the Events List page to WordPress? Is that why creating a tag for an event doesn’t result in an equivalent class added to the appropriate div on the Events List page? It doesn’t seem like that should be the case since I believe this is the default setup of EventEspresso.
The only other suggestion I saw was to use the [EVENT_LIST] shortcodes to control what categories get published to the event list…but I am not sure how to do that especially with the way it is set up right now. As I mentioned earlier, some basic css and scripting is about the extent of my skill level nowadays with this kind of stuff.
I would appreciate any help and insight on this. It seems like using the shortcodes would be more robust since that would prevent any mention of the event from ever reaching the Event List, whereas the CSS workaround just hides it, from my understanding. But the end result might be close enough if switching over to a shortcode-generated page is too much of a hassle or if it would break the design & look of the Events List page.
Again, it’s WordPress 4.6.1 with EventEspresso 4.9.16.p.
The URL for the Events List page is: http://online-icec.org/events
Ah I messed up the blockquote tag there, but there was no preview option nor do I see an option to edit the post. Sorry!
No problem, I’ve fixed the blockquote within your post.
Sort of, the /events/ ‘page’ is not actually a page, its an archive of EE event posts. The generation of that page is down to your sites theme.
That’s dependent on the theme.
Your theme simply adds a ‘post’ class to each post, there are no additional classes and nothing useful to be able to target specific posts (events)
We can normally provide some CSS to hide specific events but as your theme doesn’t use any classes that allow for this we can’t.
There is only so much we can inject into the event post, other details should be added by your theme, for the above to work your theme needs to use the post_class() function within the loop to add the additional classes to the posts. (It looks like it does not use that function)
So for this to work you would generate a new page, add the shortcode for your public classes to that page and then when adding the events you add the events you want to be public to that category.
Would that work?
Thanks so much for the reply. I did seperate the public events into their own category in anticipation of a method like this, so that does sound like it will work. But forgive my general incompetence around this, as I cannot figure out exactly where I would generate this new page with the shortcode.
Intuitively I would have expected it to be under General Settings > Critical Pages > Event List where I would be able to edit the shortcode.
Thanks again for your help, and sorry if I am not properly understanding something.
Upon second look I see that you must have meant just create a new blank wordpress page with the shortcode…I will still have to figure out how to get it to replace the current /events/ page though.
I did go ahead and try that, but it does not seem to work on parent categories? Your categories are supposed to be hierarchical, so I moved all of our existing public categories into a new category called “Main.” I then created the page with the shortcode
It did work when I tried putting in one of the sub-category slugs, but that brought up another issue. Under the page title (Events), it generated an extra title (“UPCOMING EVENTS”), which frankly makes the page look ugly and broken. Is there a way I can alter the shortcode to prevent that from showing up? Please refer this screenshot to see what I mean.
It would be nice to be able to use the parent category as I said, but if that is completely impossible, is there a way to specify multiple category slugs in the shortcode? I tried using a comma-separated list but it would just return a blank page.
The categories are actually hierarchical, but that doesn’t mean you can assign an event to a child category and that will automatically make the event also assigned to the parent category. The taxonomy hierarchy is more for organizing those categories.
I can give you a few options for that issue where there’s an “Upcoming Events” header.
Option 1: The Upcoming Events header can be hidden by using some CSS. You add this to your custom stylesheet:
Option 2: Instead of setting up pages with shortcodes, you can link directly to the event category archive pages. For example, your Yoga event category archive is located at this URL:
Awesome, it looks like using an event-category URL is the cleanest solution here as the public events are already separated into their own category, and the hierarchy is preserved here, so a link to the parent category will display events from all the child categories.
I just have one last quibble that I would like to iron out if possible – is there any way (please please say yes) to disable the /events/ URL? I realize this may be outside the scope of your support for EE, but for our use case we really need that /events/ page to not be accessible even by direct link, in case someone has it bookmarked or has the URL memorized. It should be nonexistent (as in returns a 404 or a URL redirect to the event-category page) so that there is no way to find our private events on the website unless you have a link directly to the event.
I tried in the WP admin panel, going to Pages and deleting the Events page which had the URL [code]http://online-icec.org/events[/code] but that didn’t seem to have any impact.
If it is possible to address that, I can rest easy on this issue. We are really satisfied with EventEspresso in terms of its functionality, and I really thank you guys on the support team for your time and dedication to your customers. I have seen a lot of cases while I was searching the forums where you guys have gone above and beyond to craft solutions for your customers when you could have just said “No sorry we don’t have that or we don’t support it.” You make sure they are happy and they can accomplish the things they need to. That is really nice to see and really appreciated. Thank you!
And thank you Josh and Tony for your attention to this support ticket!
You can use the Redirection plugin to set up a redirect to your preferred event list URL.
Ok very cool I will go that a go!
Another thing I just noticed (sorry this seems to go on and on) is the upcoming events widget we have on our front page.
Is there any way to control what categories get published to that?
Or to put it alternatively, is there maybe a different widget that will only display events of a definable category?
Have you checked the widget settings? It has a category selector that lets you select a category to display events from. It looks like this.
Ah, okay, thank you. It took me a while to find where that was.
It seems to more or less work for what we need. The only thing I would say is there are some inconsistencies with the way the parent-child relationship is handled in different areas. For example if I go to
From what I can see, these solutions should meet our needs for the present moment, so I am going to mark this as resolved. Thank you guys so much for your help and sorry for being a bit of a dunce at times. I just recently hopped on managing the events for the community and have not administered a WP site before so the hand-holding was much appreciated.
If something else comes up regarding this issue, I will make sure to reopen the ticket or create a new ticket referencing this one so all the information stays connected. But hopefully we are all set.
Thanks again and I wish you guys lots of happiness and a stress free life 😀
The support post ‘Hiding Event Pages from the Event List’ 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.