Home › Forums › Calendar Products › Events Calendar PRO › Grabbing the tribe event URL
- This topic has 3 replies, 2 voices, and was last updated 8 years, 10 months ago by Support Droid.
-
AuthorPosts
-
June 8, 2014 at 5:05 pm #213644James KashettaParticipant
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(); ?>June 8, 2014 at 5:06 pm #213646James KashettaParticipantSome 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(); ?>June 8, 2014 at 5:25 pm #213667James KashettaParticipantfigured it out:
<?php echo tribe_get_event_meta( get_the_ID(), ‘_EventURL’, true ); ?>July 7, 2015 at 6:30 am #983308Support DroidKeymasterThis 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. -
AuthorPosts
- The topic ‘Grabbing the tribe event URL’ is closed to new replies.