• Resolved donnytree

    (@donnytree)


    Hello,

    For some reason I cannot get the venue to work on the home page of our site. For a single and list events page, the venue shows up fine, but if I put the same/similar code on the home page, nothing shows up for venue?

    Not working:

    // Setup an array of venue details for use later in the template
         $venue_details = tribe_get_venue_details();
         // Venue
         $has_venue_address = ( ! empty( $venue_details['address'] ) ) ? ' location' : ''; ?>
         <p class="event-date-location"><?php echo tribe_events_event_schedule_details(); ?></p>
         <?php echo $venue_details['name']; ?>

    Working:

    // Setup an array of venue details for use later in the template
        $venue_details = tribe_get_venue_details();
    // Venue
        $has_venue_address = ( ! empty( $venue_details['address'] ) ) ? ' location' : '';
    <!-- Schedule & Recurrence Details -->
        <div class="tribe-event-schedule-details"><?php echo tribe_events_event_schedule_details() ?>
        </div>
        <?php echo $venue_details['name']; ?>

    Any help would be appreciated!
    Thanks,
    Donna

    https://www.ads-software.com/plugins/the-events-calendar/

Viewing 1 replies (of 1 total)
  • Thread Starter donnytree

    (@donnytree)

    I meant to add, that the “Working” code is from /tribe-events/single-event.php. Thank you!

Viewing 1 replies (of 1 total)
  • The topic ‘$has_venue_address not working on home page’ is closed to new replies.