Help Adding 'Website' field to List View

Home Forums Calendar Products Events Calendar PRO Help Adding 'Website' field to List View

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1094896
    Douglas LaMunyon
    Participant

    Hi there,
    I have read through the documentation on customizing php templates and I understand the process for this, but I’m struggling with the code a bit.

    Our client has requested a specific events display format for their website; what we are trying to do is simply add the website field to a prominent location on the events page within the list view.

    I have located this area in modules > meta > details.php, but nothing I have tried so far is doing the trick:
    <?php
    // Event Website
    if ( ! empty( $website ) ) : ?>

    <dt> <?php esc_html_e( ‘BUY TICKETS NOW:’, ‘the-events-calendar’ ) ?> </dt>
    <dd class=”tribe-events-event-url”> <?php echo $website; ?> </dd>
    <?php endif ?>

    Note that I have customized the label for this field. We are currently testing things out in a development area, and I’m making all the customizations in new folder(s) we created inside the child theme.

    Can you tell me:

    1. which template we should be working in (list.php, list > content.php, etc.)
    2. where we would add the code to the specified template
    3. how the code should look

    Thank you so much for a great plugin, and for your help making this happen.

    #1095251
    Brook
    Participant

    Howdy dmlws,

    I would love to help you with this.

    If I were you I would use this code:

     <?php
    // Event Website
    $website = tribe_get_event_website_url();
    if ( ! empty( $website ) ) : ?>
    <a href="<?php echo $website; ?>">BUY TICKETS NOW</a>
    <?php endif ?>

    And I would insert it into /the-events-calendar/src/views/list/single-event.php via a theme override (Themer’s Guide). About line 50 is probably the right spot, it really depends on where you want it. But Line 50 would be pretty prominent.

    Does that all make sense? Did that work for you? Please let me know.

    Cheers!

    – Brook

    #1095519
    Douglas LaMunyon
    Participant

    Brilliant! That’s absolutely perfect. This is just exactly what I needed. Worked like a charm on the first try!
    A million thanks for such a fast response as well. I greatly appreciate it.

    #1095824
    Brook
    Participant

    You are super welcome! I’m happy it fit the bill so well.

    Let us know if you ever need anything else.

    • Brook
Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Help Adding 'Website' field to List View’ is closed to new replies.