Home › Forums › Calendar Products › Events Calendar PRO › Change order address details Events Calendar List
- This topic has 6 replies, 3 voices, and was last updated 10 years, 6 months ago by
George.
-
AuthorPosts
-
October 23, 2015 at 12:29 am #1017169
Bark
ParticipantHi,
I recently bought the TEC and there is a small customization I would like to conduct. However, I am not famiiliar with PHP and perhaps you could help me out here π

As you can see, the address is shown by default the US way. However, I would like to set the address as follows:
Venue, Street, ZIP code City Country +Google Map (everything on 1 line)
As you can see, I would also love to delete the </br> after the streetname in the default version.
I hope you can help me solving this “issue”.
Thanks,
Best regards,
Bark
October 23, 2015 at 8:16 am #1017314George
ParticipantHey @Bark,
Unfortunately we explicitly can not help out with your PHP customizations β I’m sorry to bear that news.
If you’re interested in customizing the address display, however, you can do this by customizing various calendar templates using the techniques described here β https://theeventscalendar.com/knowledgebase/themers-guide/
With those techniques, then, you can construct addresses however you’d like. To see all the address-related code you can use to rearrange things, head to your The Events Calendar plugin files and look for this file:
/src/functions/template-tags/venue.phpYou can use any function there to achieve your goals. If this is all out of your comfort zone, unfortunately the next best step would be to hire someone to help you. There are tons and tons of developers out there, of course, and we also have a list of some here that might be helpful β http://m.tri.be/18k1
Cheers!
GeorgeOctober 24, 2015 at 12:32 am #1017523Bark
ParticipantThanks George, I will take a look at it.
October 25, 2015 at 3:01 pm #1017722Vincent
ParticipantHi, We had the same problem till today I think I solved this one π You can see the results on http://www.kantoor.nl . Im no programmer so sorry if things sounds a bit weird. this is what I did:
go to \wp-content\plugins\the-events-calendar\src\views\modules and make a copie of the file address.php . Copie the file to /wp-content/themes/YOUR-THEME/tribe-events/modules.
in the file change the following the part between
// This location’s street address.
and
// This location’s abbreviated region. Full region name in the element title.into
if ( tribe_get_address( $venue_id ) ) : ?>
<span class=”street-address”><?php echo tribe_get_address( $venue_id ); ?></span>
<?php if ( ! tribe_is_venue() ) : ?>
<br>
<?php endif; ?>
<span class=”delimiter”>,</span>
<?php endif; ?><?php
// This location’s postal code.
if ( tribe_get_zip( $venue_id ) ) : ?>
<span class=”postal-code”><?php echo tribe_get_zip( $venue_id ); ?></span>
<?php endif; ?><?php
// This locations’s city.
if ( tribe_get_city( $venue_id ) ) :
if ( tribe_get_address( $venue_id ) ) : ?><?php endif; ?>
<span class=”locality”><?php echo tribe_get_city( $venue_id ); ?></span><spanclass=”delimiter”>,</span>
<?php endif; ?><?php
————————————-
// now it should work fine-
This reply was modified 10 years, 6 months ago by
Vincent.
October 26, 2015 at 1:06 am #1017788Vincent
ParticipantHi Bark,
I forgot to say that you have to make a child theme folder otherwise your alterations would be erased with the first update of TEC
regs,
VC
October 26, 2015 at 2:07 am #1017793Bark
ParticipantAwesome Vincent! I am really grateful to you. Thank you.
In order to complete the alteration, I also had to delete this part in my newly formed address.php file:
// This location’s postal code.
if ( tribe_get_zip( $venue_id ) ) : ?>
<span class=”postal-code”><?php echo tribe_get_zip( $venue_id ); ?></span>
<?php endif; ?>Otherwise I would end up with two ZIP codes in the meta information box π
October 26, 2015 at 11:31 am #1018053 -
This reply was modified 10 years, 6 months ago by
-
AuthorPosts
- The topic ‘Change order address details Events Calendar List’ is closed to new replies.
