Support

Home Forums Event Espresso Premium Shortcode on another page

Shortcode on another page

Posted: October 24, 2022 at 2:31 pm

Viewing 4 reply threads


Michael King

October 24, 2022 at 2:31 pm

I set up events in the usual way, and those pages are in the site-name.org/events/ url, that’s all fine. However, I really want to use the registration shortcode on a more formatted page, that is the same url for all out events, with more description about the event, and some legal boiler plate and I’ve been doing that for a while; works great!

Let’s say that page with the shortcode is in site-name.org/projects/ This morning, probably with Mr Google’s help, one of our customers discovered the page in /events/ and started sending others to that page which I didn’t want. This is the first time this has come up, and it’s not a terrible problem just not what we want due to the boilerplate issue. A million monkeys with a million laptops will eventually find any url so just changing the url for the EE4 pages won’t help.

So I first thought I could just set up a redirect from the not-desired page to the desired one. Also worked great; also kept the shortcode from working, which I didn’t think about. I thought about adding a password to the not-desired page, but I think that will have the same problem.

That leaves me looking for a way to keep people away from the page in /events/ and leave the ‘pretty’ page with the shortcode working. Any thoughts, tips, things I’m missing?


Garth

  • Support Staff

October 25, 2022 at 3:00 pm

Hi Michael,

Try setting the event status to Private and using the shortcode. Private means they would have to be logged-in to access the event page details, but the event is still published.


Michael King

October 27, 2022 at 3:58 pm

Ok, I’ll give that a try, thanks!


Michael King

October 27, 2022 at 4:02 pm

Well…wait, now that I’ve thought about it. Our ‘customers’ for events don’t have a site account, and I don’t want them to. You said “they would have to be logged-in to access the event page details, but the event is still published.” So does that mean the shortcode would work from that other page? Maybe I just don’t know what Private and Published mean in this context.


Tony

  • Support Staff

October 31, 2022 at 4:47 am

Hi Michael,

Setting the event to be privately published means that only logged-in users with the correct capabilities can then view them, they won’t be seen publicly.

However, if you then use EE shortcodes to pull in data from that event… in this case, I assume you are using [ESPRESSO_TICKET_SELECTOR event_id=XXX] so those will still parse and allow regular visitors to register onto the event through the page parsing that shortcode.

The /events/{event} page will show 404 not found for everyone but logged-in users and the event will no longer be listed within event lists generated by Event Espresso on the front end.

Is that what you are looking for?

EE events are a custom post type within WordPress, so the documentation for private posts for WP applies to our events:

https://wordpress.org/support/article/content-visibility/#private-content

Viewing 4 reply threads

The support post ‘Shortcode on another 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