Grabbing the tribe event URL

Home Forums Calendar Products Events Calendar PRO Grabbing the tribe event URL

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #213644
    James Kashetta
    Participant

    I’ve been looking over how to pull in the tribe event website url from what I came across this should work:

    tribe_get_event_meta( $post, ‘_EventURL’, true );

    But for some reason I can not pull it in like that at all. I would like to link the event title to the Event website link

    Heres what I’ve been trying:

    <?php
    global $post;
    $all_events = tribe_get_events(array(
    ‘eventDisplay’=>’all’,
    ‘posts_per_page’=>-3
    ));

    foreach($all_events as $post) {
    setup_postdata($post);
    $url = tribe_get_event_meta( $post, ‘_EventURL’, true );
    ?>
    <div class=”c4″ id=”product”>
    <div class=”artist_date”> <?php if (tribe_get_start_date() !== tribe_get_end_date() ) { ?>
    <?php echo tribe_get_start_date( $post, false, ‘ j M’ ); ?> – <?php echo tribe_get_end_date( $post, false, ‘ j M’ ); ?>
    <?php } else { ?>
    <?php echo tribe_get_start_date( $post, false, ‘j M’ ); ?>
    <?php } ?></div>
    <?php echo tribe_meta_event_category_name(); ?>

    <div class=”blog-title-home”><?php the_title(); ?></div>
    <?php the_excerpt(); ?>

    <?php echo tribe_get_city() ?>
    <?php echo tribe_get_region() ?>
    <?php echo tribe_get_country() ?>

    </div>
    <?php } ?>
    <?php wp_reset_query(); ?>

    #213646
    James Kashetta
    Participant

    Some of the code got cut off for some reason. let me try that again:

    <?php
    global $post;
    $all_events = tribe_get_events(array(
    ‘eventDisplay’=>’all’,
    ‘posts_per_page’=>-3
    ));

    foreach($all_events as $post) {
    setup_postdata($post);
    $url = tribe_get_event_meta( $post, ‘_EventURL’, true );
    ?>
    <div class=”c4″ id=”product”>
    <div class=”artist_date”> <?php if (tribe_get_start_date() !== tribe_get_end_date() ) { ?>
    <?php echo tribe_get_start_date( $post, false, ‘ j M’ ); ?> – <?php echo tribe_get_end_date( $post, false, ‘ j M’ ); ?>
    <?php } else { ?>
    <?php echo tribe_get_start_date( $post, false, ‘j M’ ); ?>
    <?php } ?></div>
    <?php echo tribe_meta_event_category_name(); ?>

    <div class=”blog-title-home”>< a href = ‘$url’ > <?php the_title(); ?></div>
    <?php the_excerpt(); ?>

    <?php echo tribe_get_city() ?>
    <?php echo tribe_get_region() ?>
    <?php echo tribe_get_country() ?>

    </div>
    <?php } ?>
    <?php wp_reset_query(); ?>

    #213667
    James Kashetta
    Participant

    figured it out:
    <?php echo tribe_get_event_meta( get_the_ID(), ‘_EventURL’, true ); ?>

    #983308
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Grabbing the tribe event URL’ is closed to new replies.