Home › Forums › Ticket Products › Event Tickets Plus › Hiding Cost on Events Pages
- This topic has 4 replies, 3 voices, and was last updated 9 years, 2 months ago by
Michele.
-
AuthorPosts
-
March 14, 2017 at 5:09 pm #1254147
Michele
ParticipantHello there,
I am attempting to hide the cost on events pages for my site. The site is http://mca-omaha.org/?post_type=tribe_events
I successfully hid the price at the top of the page in individual events (.single-tribe_events .tribe-events-schedule .tribe-events-cost), but for the details section below, I can’t get rid of it without hiding the whole column (I have it hidden now, but you can see how it would otherwise look in my attached screenshot – it’s the top box, “Details” column).
The weird thing is that it shows up as I’d like it, without the price, when I view the preview the page before updating. However, as soon as I update it, it reappears.
We don’t have anyone that knows php on hand – is there another way for me to hide the cost in this area without hiding the whole column?
Thank you!
March 15, 2017 at 7:12 am #1254444Geoff
MemberHey Michele,
Absolutely, that’s totally possible! I would suggest overriding the details.php template to make that happen. You can learn more about overriding calendar templates in our Themer’s Guide, but it basically boils down to this:
- Make a copy of the details.php template. It is located at /wp-content/plugins/the-events-calendar/src/views/modules/details.php
- Make a new folder in your theme called tribe-events
- Make a new folder in that one called modules
- Drop your copied details.php file in that last folder
Now that the template is in your theme, you can modify it to suit your needs. In this case, remove the following code from the template:
<?php // Event Cost if ( ! empty( $cost ) ) : ?> <dt> <?php esc_html_e( 'Cost:', 'the-events-calendar' ) ?> </dt> <dd class="tribe-events-event-cost"> <?php esc_html_e( $cost ); ?> </dd> <?php endif ?>Will this work for you? Please let me know. 🙂
Cheers!
GeoffMarch 15, 2017 at 8:13 am #1254481Michele
ParticipantHi Geoff!
Thank you for your answer! We actually decided not to have that section there at all, like we have it now, so I think we’re ok on this one.
Thank you!
March 15, 2017 at 3:32 pm #1254773Geoff
MemberAwesome, glad to hear it! At least you have a way to go about it if you ever decide to bring the column back. 🙂
I’ll go ahead and close this thread but let us know if any other questions come up and we’d be happy to help.
Cheers!
Geoff -
AuthorPosts
- The topic ‘Hiding Cost on Events Pages’ is closed to new replies.
