WordPress.org

Ready to get started?Download WordPress

Forums

Event Organiser
[resolved] How to display venue address? (4 posts)

  1. earthtojeremy
    Member
    Posted 2 years ago #

    Hi -

    I want to automatically display the venue address in taxonomy-event-venue.php. I tried several variations of the code listed on the relevant doc page but so far all I can get it to do is display the word "Array". Can you show me the code to achieve this?

    Thanks,
    Jeremy

    http://wordpress.org/extend/plugins/event-organiser/

  2. akyusa01
    Member
    Posted 2 years ago #

    I did this a couple of weeks ago as a test and accidentally deleted my code. I'm still messing around trying to get it back. Once I do I will repost..

  3. akyusa01
    Member
    Posted 2 years ago #

    found it!

    Ok first I'm doing this all within the loop, so here goes

    <?php
    //Get the description and print it if it exists
    $venue_description =eo_get_venue_description();
    $address_array = eo_get_venue_address($event->ID);
    if(!empty($venue_description)){?><!---- If the venue has a description display it-->
    <div class="venue-archive-meta">
    <p><?php echo $venue_description; ?> located at <<?php echo $venue_description; ?> located at <?php echo $address_array['address'].'<span> , </span>'.$address_array['postcode']; ?>
    </div>
    <?php } ?>

  4. earthtojeremy
    Member
    Posted 2 years ago #

    Thanks, I cut it down to this to just display the address:

    <?php $address_array = eo_get_venue_address($event->ID); ?>
    <?php echo $address_array['address'].' ยท '.$address_array['postcode']; ?>

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic