Support

Home Forums Event Espresso Premium List a specific event on a seperate page

List a specific event on a seperate page

Posted: May 14, 2018 at 5:05 pm


james.hill

May 14, 2018 at 5:05 pm

Hi

Due to limitations with this plugin (around different form workflows for different ticket SKUs)…i would like to create a seperate hidden event …that has a free ticket..but i dont want this event listed on the same “events list” as my publicly available tickets…

I have setup a seperate page with a private login….and a seperate event/ticket on this page…

What shortcode allows me to only display specific event IDs on the events list?…So i can seperate the visible events from the private events.

Thanks
Stu


Tony

  • Support Staff

May 15, 2018 at 4:41 am

Hi Stu,

We don’t have a short code that allows you to set specific event ID’s to display/hide, you could use categories an have a ‘public’ category, then call the ESPRESSO_EVENT list shortcode to display the public events. For example:

[ESPRESSO_EVENTS category_slug=public]

would only display events in the ‘public’ category.

However your users would still be able to find the private events through the category archives using that method.

Another option is to use the pre_get_posts filter and set the posts ID’s to exclude using post_not_in, like this:

https://gist.github.com/Pebblo/24791195c24b868c88ad0ee217906b96

Which excludes events with ID 58, ,11, 1911 from any front end lists, you just set the ID’s you want to remove and add that function to a custom functions plugin:

https://eventespresso.com/wiki/create-site-specific-plugin-wordpress-site/

You can then use the [ESPRESSO_TICKET_SELECTOR event_id=58] to display the ticket selector for one of those events on a page of your choosing, or if you link directly to the event it will be accessible that way.


james.hill

May 15, 2018 at 8:51 pm

woah! wasnt expecting that much of a workaround…i would have thought there should be a SCode that could do this?

So if i add the PHP to a custom plugin i can isolate the event from my “events listing” page? correct?

The with a ticket selector…on an alternate private page….display a ticket selector there?

Is that what your option will achieve?


james.hill

May 16, 2018 at 3:24 am

Hello

Seems like the solution has stopped the event from being listed in the events page…thanks for that…however in the bottom of the any actuasl event listing page…there is a naivgation link that cycles between my events…is there a way to hide this link? As people can access my hidden ticket page via this.

Cheers
Stu


james.hill

May 16, 2018 at 3:28 am

All good actually…ill just add this code…

.post-navigation {
display: none;
}

Mainly wondering if there is an option to turn this off anywhere?


Tony

  • Support Staff

May 16, 2018 at 6:09 am

EE doesn’t add the ‘Next/Previous’ buttons mentioned, most likely they are from your theme (EE events are custom post types, so you theme is outputting them just like a post with the navigation).

Which theme are you using?

The support post ‘List a specific event on a seperate page’ 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