Support

Home Forums Event Espresso Premium Hiding upcoming tickets in embed and html code

Hiding upcoming tickets in embed and html code

Posted: December 13, 2016 at 10:23 am

Viewing 4 reply threads


AmritYoga2015

December 13, 2016 at 10:23 am

Hello.
We are using HTML and Embed code snippets to populate text elements with event espresso listing. Currently We are trying to hide tickets with status: upcoming, or expired. We are using the following codes in a custom Css plugin.

.espresso_events .ticket-pending {display:none;}
.post-type-archive-espresso_events .ticket-pending {display:none;}
.single-espresso_events .ticket-pending { display: none; }
.tkt-slctr-tbl-wrap-dv .ticket-sales-pending {display:none;}
.espresso_events .ticket-sales-expired {display:none;}
.post-type-archive-espresso_events .ticket-sales-expired {display:none;}
.single-espresso_events .ticket-sales-expired { display: none; }
.tkt-slctr-tbl-wrap-dv .ticket-sales-expired {display:none;}

Tickets of status expired and upcoming still display. Can you help provide a solution.


AmritYoga2015

December 13, 2016 at 10:33 am

We’ve gotten it to work thru [Espresso_Events] shortcode, but not HTML Embed code


Tony

  • Support Staff

December 13, 2016 at 10:46 am

Hi there,

Can I ask why you are using the embed code an nort the ticket selector shortcode?

[ESPRESSO_TICKET_SELECTOR event_id=your_event_id]

The reason the above is happening is your custom CSS is not loading within the iframe of the embedded ticket selectorm switching to the above shortcode will continue to use the styles loading on the event page.


AmritYoga2015

December 13, 2016 at 11:44 am

The main reason is that the embed code looks nicer – the page layout is much better. Is there a way to hide upcoming and expired status tickets when using the embed code?


Tony

  • Support Staff

December 13, 2016 at 4:28 pm

You would need to include your own custom CSS file when loading the iframe, I have previously posted an example of how you can do that here:

https://github.com/eventespresso/ee-code-snippet-library/blob/master/templates/tw_ee_ticket_selector_iframe_custom_css.php

That function loads a ‘custom_iframe_css.css’ file from within /{your theme}/espresso/ which you will need to manually create and add the above CSS to remove the tickets from view.

Viewing 4 reply threads

The support post ‘Hiding upcoming tickets in embed and html code’ 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