• Resolved Cameraman

    (@cameraman)


    When using the Events calendar the Event Cost section states the following, “Enter a 0 for events that are free or leave blank to hide the field.”

    When viewing the event on my home page the event still displays the Cost: FREE.

    I have asked my Theme developer to add to the Themes Child Page on the theme functions.php file the following code as suggested on the Forum but it has had no effect at all:

    <?php
    /*
    * 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;
    }

    Please can you advise how to resolve this?

    Thanks

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi @cameraman,
    Thanks for writing in,

    Your code is almost there, please have a look on this knowledgebase article which provides the snippet you are looking for.

    Let me know if it works.

    Best
    Santiago

    Plugin Support Jaime

    (@jaimemarchwinski)

    Hey there! This thread has been inactive for a while so we’re going to go ahead and mark it Resolved. Please feel free to open a new thread if any other questions come up and we’d be happy to help. ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Event shows Cost as Free’ is closed to new replies.