Change order address details Events Calendar List

Home Forums Calendar Products Events Calendar PRO Change order address details Events Calendar List

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1017169
    Bark
    Participant

    Hi,

    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 πŸ™‚

    Order of address details by default

    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

    #1017314
    George
    Participant

    Hey @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.php

    You 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!
    George

    #1017523
    Bark
    Participant

    Thanks George, I will take a look at it.

    #1017722
    Vincent
    Participant

    Hi, 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><span

    class=”delimiter”>,</span>
    <?php endif; ?>

    <?php

    ————————————-
    // now it should work fine

    • This reply was modified 10 years, 6 months ago by Vincent.
    #1017788
    Vincent
    Participant

    Hi 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

    #1017793
    Bark
    Participant

    Awesome 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 πŸ˜‰

    #1018053
    George
    Participant

    Thank you both for sharing your solutions here! A child theme is a great idea and it makes me smile to see a community member recommending using that method – thanks a ton, @Vincent!

    Best of luck with (both of) your site(s)!

    Cheers,
    George

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Change order address details Events Calendar List’ is closed to new replies.