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


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 );

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.

Support forum for Event Espresso 3 and Event Espresso 4.
Documentation for EE3 and EE4
Documentation for Event Espresso 3

Documentation for Event Espresso 4

Status: closed

Updated by  Josh 2 months, 2 weeks ago ago

Topic Tags

Tagged: ,

Notifications

This topic is: resolved
Do NOT follow this link or you will be banned from the site!