Support

Home Forums Event Espresso Premium Removing items from "Show Details"

Removing items from "Show Details"

Posted: December 6, 2017 at 12:18 pm


verilycreative

December 6, 2017 at 12:18 pm

I am interested in removing the “Price” row and “Sale Dates” rows from the “Show Details” expansion on all event pages. All of our events are free, and the sale dates are not relevant for the end user in our case. Is this a possibility?

Also, under “Access” in the same details expansion, I would like to remove the “Total Sold” and “Total Spaces Left” columns from the table. Is this possible?


Tony

  • Support Staff

December 6, 2017 at 1:40 pm

Hi there,

I am interested in removing the “Price” row and “Sale Dates” rows from the “Show Details” expansion on all event pages. All of our events are free, and the sale dates are not relevant for the end user in our case. Is this a possibility?

We don’t have an option to remove those details, but you can hide them using CSS:

.tckt-slctr-tkt-details-td .tckt-slctr-tkt-price-sctn, 
.tckt-slctr-tkt-details-td .tckt-slctr-tkt-sale-dates-sctn {
    display: none;
}

You can add that to Appearance -> Customize -> Additional CSS

Please refer to this guide for more detailed information about the CSS customizer: https://codex.wordpress.org/CSS#Custom_CSS_in_WordPress

Also, under “Access” in the same details expansion, I would like to remove the “Total Sold” and “Total Spaces Left” columns from the table. Is this possible?

We have an option to do that in Event Espresso -> Events -> Template -> Ticket Selector Template Settings -> Show Ticket Sale Info?

Set that to No, save and retest.

Is that what you are looking for?


verilycreative

December 7, 2017 at 10:31 am

Thank you for the help. In the first situation, that did exactly what I needed. Thank you.

In regards to the “show ticket sale info,” that actually eliminated too much information. I still need to see the number of spots remaining, and the number registered for that ticket type. Is it possible to remove only the “total sold” and “total spaces left” columns?


Tony

  • Support Staff

December 8, 2017 at 2:43 am

Sure, you can hide it using CSS:

.tckt-slctr-tkt-details-tbl .tckt-slctr-tkt-details-total-tickets-sold-th, 
.tckt-slctr-tkt-details-tbl .tckt-slctr-tkt-details-total-tickets-left-th, 
.tckt-slctr-tkt-details-tbl td[data-th='Total Sold'],
.tckt-slctr-tkt-details-tbl td[data-th='Total Spaces Left'] {
    display: none;
}


verilycreative

December 12, 2017 at 10:48 am

Thank you so much! I have just one more question about customizing this page. Is there a way, under access, to change the word “sold?” I would like to change it from “sold” to “taken.”


Tony

  • Support Staff

December 13, 2017 at 2:59 am

Sure there is, you would use this function:

https://gist.github.com/Pebblo/e5eaa91d366ddd988d3ace8916b03fa0#file-example-php-L10-L13

Whatever string you return from that function will be used in place of the default and you can add that to a Custom Functions Plugin on your site.


verilycreative

December 13, 2017 at 10:25 am

I must be doing something incorrectly. Let me know if I’ve done everything correctly:

– I made the following change to the code, changing “return ‘Sold'” to “return ‘taken'”:

//Change the ‘Sold’ string
function tw_ee_access_change_this_ticket_sold_string() {
return ‘Taken’;
}

– I tried copying both that function only and the entirety of the example (including the edit) into the code window on the plugin “My Custom Functions.”

– As you can see on my demo event, it is still reading as “Sold” under access. Any thoughts? http://emmaus.verilyhost.com/events/emmaus-men-101-thursday-volunteer-opportunities/


Tony

  • Support Staff

December 13, 2017 at 2:24 pm

Can you post all of the code you are using in the custom functions plugin to PasteBin and then post the URL here?

I’ve just test the above gist and confirmed it works on those strings so need to see the code you are using.


verilycreative

December 13, 2017 at 6:01 pm

https://pastebin.com/5rc5dGvP

I have also tried it with the opening php tag.


Tony

  • Support Staff

December 14, 2017 at 2:22 am

That’s the full content of your custom plugin?

I have also tried it with the opening php tag.

In that case, the above isn’t even running on your site as you’d run into errors if you did that with the code being ran.

It looks like you are missing step 5 from:

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

Add:

<?php
/*
Plugin Name: Site plugin for myexamplesite.com
Description: Site specific code for myexamplesite.com
*/
/* Begin Adding Functions Below This Line; Do not include an opening PHP tag as this sample code already includes one! */

/* Stop Adding Functions */

To the beginning of the file above the functions, then go to Dashboard -> Plugins

You’ll see whatever you have set as ‘Plugin Name:’ in the list, activate that plugin. Does it work then?


verilycreative

December 14, 2017 at 9:38 am

Forgive me for misunderstanding, but I didn’t create a custom plugin. I used a “my custom function” plug in and copied the code, changing the return. Are we talking about two different things?


Tony

  • Support Staff

December 15, 2017 at 4:27 am

Yes, that’s not the same… but it should work if you want to use it.

I’m assuming this is the plugin? https://en-gb.wordpress.org/plugins/my-custom-functions/

I installed that on a test site and added my function to it – http://take.ms/PEtXD

(Make sure its set to ‘On’ and no notice shows about a ‘Fatal error’ is shown on the page)

That worked fine – http://take.ms/mIAaQ

I’d still recommend switching over to creating your own custom function plugin and adding functions to that (it’s a little quicker than loading functions from the database like that plugin) but both work fine, just don’t use both together, only one or the other.

The support post ‘Removing items from "Show Details"’ 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