Support

Home Forums Event Espresso Premium Displaying event venue name using shortcode

Displaying event venue name using shortcode

Posted: March 6, 2019 at 10:50 am

Viewing 1 reply thread


Ruben

March 6, 2019 at 10:50 am

hello I am trying to display the upcoming events on my homepage
I am using [ESPRESSO_EVENTS limit=3] and ading content-espresso_events-shortcode.php to my child theme I have:

">
<?php the_title(); ?>
<?php espresso_event_date("M d, Y", " ", $post->ID) ?>
<?php
$VNU_ID = espresso_venue_id( $post->ID); //Get venue id
$venue_name = espresso_venue_name( $VNU_ID,"none", FALSE ); //Venue name
echo $venue_name ?>

the title and date work fine, but I can’t make the venue name to display, what I am missing here?


Josh

  • Support Staff

March 6, 2019 at 11:18 am

If I were to guess, the $post-ID used there may be the post ID of the page that has your shortcode on it.

You could try doing this instead:

$venue_name = espresso_venue_name( NULL, 'none', false );

Viewing 1 reply thread

The support post ‘Displaying event venue name using shortcode’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso