Posted: February 1, 2016 at 11:18 am
|
Hi, Is it possible to remove the event end times from within the ticket selector details? I could not see a css class for this as the element wraps both start and end times. Thanks |
Hi Calex, I can check into that to see if there are some CSS classes that can be targeted. Could you share a screenshot (https://eventespresso.com/wiki/troubleshooting-checklist/#screenshots) of the area that you are referring to? For example, is this the information that is shown when you click on the details link for a specific ticket option? — |
|
|
Lorenzo, Cheers |
Hi, that spot doesn’t have different classes for the different elements. However, it is possible to load your own version of the ticket selector: //* Set Event Espresso to look for the ticket selector template in the espresso templates folder within the uploads folder for WordPress add_filter ('FHEE__EE_Ticket_Selector__display_ticket_selector__template_path', 'ee_custom_ticket_selector_template_location'); function ee_custom_ticket_selector_template_location(){ return WP_CONTENT_DIR . '/uploads/espresso/templates/ticket_selector_chart.template.php'; } You could load your own version that has CSS classes added and then selectively hide those elements for certain events. — |
|
|
Lorenzo, |
If you going to load your own templates I would recommend against using /wp-content/uploads/ to store templates if possible, some security plugins really don’t like .php files being saved there and will just empty the contents of the file. Which means that anything setup to use the template will continue to ‘work’ but display nothing (as the template loads but there’s nothing in it). I would use get_stylesheet_directory() to build a path to a child theme and place the template there. As for the times you’ll need to build out your own times and not use the datetimes time_range() method. The EE_Datetime object has other methods you can use such as start_time(), end_time() etc so you can output just the start time using:
If you install a plugin such as Kint Debugger you can wrap the datetime in
Then view the ticket selector to see what you have available. |
|
|
Tony & Lorenzo thanks for your help and solutions. I managed to output the start time as desired using the echo $datetime->start_time(); Tony, I will have to remember the Kint Debugger plugin – it looks cool and it would help me a lot in the future. Cheers. |
I’m glad you like it, theres a few things you can do with it to help. Take a look here for more info: http://raveren.github.io/kint/ Any other problems just let us know. |
|
The support post ‘Remove end times from ticket selector’ 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.