Support

Home Forums Event Espresso Premium Hiding Event Pages from the Event List

Hiding Event Pages from the Event List

Posted: November 9, 2016 at 10:07 am

Viewing 10 reply threads


ICECadmin

November 9, 2016 at 10:07 am

Hello all!

We are using WordPress 4.6.1 with EventEspresso 4.9.16.p

We have some events that we don’t want to openly advertise as they are small, intimate gatherings. So we want them accessible by URL, which we send out on a mailing list. We also want them to be password protected. Now, the password protection built into EventEspresso works fine. The problem is with making the event essentially invisible on the website. I looked into the “Private” setting, but it seems that relies on users having an account on our wordpress that they can log into. This is not ideal for us as being a small community effort, we don’t really have a dedicated web developer and I want to not have too many moving parts on the website. Having individual user accounts just adds complexity in terms of user interaction and possibly on the management side, if things ever break or there is a problem. We really want to keep it simple so we can look after the website with my meager basic knowledge of CSS & HTML.

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

Events are custom post types and use WordPress’ normal archive pages for displaying events.
If you would still like your events on a page like in Event Espresso 3.1 or earlier, simply create a page and place a shortcode to display them on the page, as described here

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.

Many thanks,

Udi

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


ICECadmin

November 9, 2016 at 10:09 am

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!


Tony

  • Support Staff

November 9, 2016 at 4:29 pm

Hi there,

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.

So from that description it sounds like you are handing off the creation of the Events List page to WordPress?

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.

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?

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.

It doesn’t seem like that should be the case since I believe this is the default setup of EventEspresso.

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)

The only other suggestion I saw was to use the [EVENT_LIST] shortcodes to control what categories get published to the event list

[EVENT_LIST] is a shortcode from EE3, it will not work with EE4 but we have another.

EE4 uses [ESPRESSO_EVENTS] to output a list of events so what you can do is setup a category for your public events, then use a shortcode such as [ESPRESSO_EVENTS category_slug=public-events] which will only show events from within that category.

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?


ICECadmin

November 9, 2016 at 6:37 pm

Hi Tony,

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.


ICECadmin

November 10, 2016 at 7:07 am

Hi Tony,

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 [ESPRESSO_EVENTS category_slug=main] with no luck. I would really like to be able to use a parent category like this as it would save me having to remember to edit the page every time a new category gets created.

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.


Josh

  • Support Staff

November 11, 2016 at 2:26 pm

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 [ESPRESSO_EVENTS category_slug=main] with no luck.

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:

.page-content .page-header {
display:none;
}

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:
http://online-icec.org/event-category/yoga


ICECadmin

November 16, 2016 at 12:34 pm

Hi Josh,

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!


Josh

  • Support Staff

November 16, 2016 at 4:42 pm

You can use the Redirection plugin to set up a redirect to your preferred event list URL.


ICECadmin

November 17, 2016 at 5:11 am

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?


Josh

  • Support Staff

November 17, 2016 at 2:54 pm

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.


ICECadmin

November 17, 2016 at 9:19 pm

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 /event-category/[parent-category/, all events from child categories will be displayed. But in places like the Upcoming Events widget, this is not the case, so I had to go into each individual event and also add it to the parent category. Luckily we don’t have too many events lined up right now so it was not too bad, and it should be easy enough to remember for the future. But it would be nice if it were more consistent, as that relationship is a great feature to take advantage of if it is applied universally.

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 😀

Viewing 10 reply threads

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.

Event Espresso