Address separator missing or wrong
-
In the list view, the venue address that is composed of street, city,… the separators are missing – everything is stitched together.
I was able to change the separator and insert the comma, but I don’t see how I can finish the address with a colon/point.
This is my modified version, but it is still very random: some addresses have commas now, but others have points. If I change the point to comma, I have a comma at the end of the address, where I would rather have nothing or a point.if ( ! $event->venues->count() ) { return; } $separator = esc_html_x( ', ', 'Address separator', 'the-events-calendar' ); $venue = $event->venues[0]; $append_after_address = array_filter( array_map( 'trim', [ $venue->state_province, $venue->state, $venue->province ] ) ); $address = $venue->address . ( $venue->address && $append_after_address ? $separator : '.' ); ?> <address class="tribe-events-calendar-list__event-venue tribe-common-b2"> <span class="tribe-events-calendar-list__event-venue-title tribe-common-b2--bold"> <?php echo wp_kses_post( $venue->post_title ); ?> </span> <span class="tribe-events-calendar-list__event-venue-address"> <?php echo esc_html( $address ); if ( ! empty( $venue->city ) ) : echo esc_html( $venue->city . $separator ); endif; if ( $append_after_address ) : echo esc_html( reset( $append_after_address ) ); endif; ?> </span> </address>
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Address separator missing or wrong’ is closed to new replies.