Hide price for events displayed in list view

Home Forums Ticket Products Event Tickets Plus Hide price for events displayed in list view

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1516624
    benhourigan
    Participant

    Hi there,

    In the list view, I want to hide the price and number of tickets remaining (crossed out in attached screenshot).

    After consulting the Themer’s Guide, in THEME-FOLDER/tribe-events/views/list/single-event.php, I have tried commenting out or deleting the following lines (68–81):

    
    <!-- Event Cost -->
    <?php if ( tribe_get_cost() ) : ?>
        <div class="tribe-events-event-cost">
            <span class="ticket-cost"><?php echo tribe_get_cost( null, true ); ?></span>
            <?php
            /**
             * Runs after cost is displayed in list style views
             *
             * @since 4.5
             */
            do_action( 'tribe_events_inside_cost' )
            ?>
        </div>
    <?php endif; ?>
    

    But the price still shows in the list view.

    Could you help me find which view template (and which part of that template) I’ll need to customize to remove the price and number of tickets remaining, as in the screenshot?

    Thanks in advance for your help.

    #1517714
    Jeremy
    Keymaster

    Hi,

    Thanks for reaching out to us! I would be happy to help 🙂

    Yes, you were modifying the right template. The subtility there is that you need to save this file under THEME-FOLDER/tribe-events/list/single-event.php instead of THEME-FOLDER/tribe-events/views/list/single-event.php.

    I hope this helps,

    Cheers,
    Jeremy

    #1520967
    benhourigan
    Participant

    Hi, Jeremy,

    Thanks so much for your help. Such a simple thing to miss! I moved the file, and it’s all working now. Thanks again.

    #1520988
    Jeremy
    Keymaster

    Hi,

    I’m glad to know it’s all working now 🙂

    I’m closing this thread then, but feel free to start a new one if you have further questions or concerns.

    Cheers,
    Jeremy

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Hide price for events displayed in list view’ is closed to new replies.