Posted: 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? |
Hi there,
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
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? |
|
|
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? |
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; } |
|
|
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.” |
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. |
|
|
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 – 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/ |
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. |
|
|
I have also tried it with the opening php tag. |
That’s the full content of your custom plugin?
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:
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? |
|
|
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? |
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.