Remove "Free" from event list and event details

Home Forums Welcome! Pre-Sales Questions Remove "Free" from event list and event details

  • This topic has 7 replies, 2 voices, and was last updated 8 years ago by Steven Hampton.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1455813
    Steven Hampton
    Participant

    I have several events that are free and the client would like to remove that wording both from the events list and individual event page.

    I found this thread that was closed: https://theeventscalendar.com/support/forums/topic/how-do-you-remove-free-from-list-view-when-using-free-event-tickets-plugin/

    I inserted the snippet from that thread into my functions.php and it removed the words Free, the button to click through to the event, and the price of events that were not free. I think that snippet needs a revision and I was hoping someone could provide it.

    `/*
    * The Events Calendar – Make code empty if it’s 0 or Free
    */
    add_filter ( ‘tribe_get_cost’, ‘tribe_not_show_free’, 10, 3 );
    function tribe_not_show_free ( $cost, $post_id, $with_currency_symbol ) {

    if ( $cost == 0 || $cost == 'Free' ) {
        $cost = '';
    }
    return $cost;
    

    }`

    #1457743
    Jennifer
    Keymaster

    Hi Steve,

    Thanks for reaching out! I’d be happy to help you with this.

    Can you please send me a screenshot of the settings for the free ticket so that I can see how it is set up?

    Thanks,

    Jennifer

    #1458628
    Steven Hampton
    Participant

    Here is the screenshot. Let me know if you need further details from this.

    #1463712
    Jennifer
    Keymaster

    Thanks! Try adding this snippet (minus the opening <?php tag) to the functions.php file of your child theme. Let me know if this works for you!

    #1463898
    Steven Hampton
    Participant

    I added that snippet and it removed the price from the items that had a fee as well.

    It’s the same trouble I had previously.

    #1480758
    Jennifer
    Keymaster

    Hi Steven,

    I’m so sorry for the delayed response here – this thread was not showing up as waiting on my end. I apologize about that!

    Try adding this snippet instead. I tested this out in my local environment, and it is working on my end. Please let me know if this does what you are looking for!

    Thanks,

    Jennifer

    #1498821
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Remove "Free" from event list and event details’ is closed to new replies.