• Resolved HungryJos

    (@hungryjos)


    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)
  • Plugin Author Gustavo Bordoni

    (@bordoni)

    Hi @hungryjos,

    Sorry for the huge delay on our answer here.

    Would you mind sharing a couple of examples of:

    – Value on Fields
    – How these values would should show on the frontend?

    That would allow me to modify the code to get it done.

    Best Regards,

    Since we haven’t heard from you in a while on this topic we will assume that the problem was fixed or is no longer applicable and with that I will mark this as resolved.

    If that is not the case, please let us know and we will gladly remove the “Resolved” tag and try to help you further. Or you can create a new topic with the problem if you prefer.

    Best,
    Sky

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Address separator missing or wrong’ is closed to new replies.