Posted: August 28, 2013 at 9:34 am
|
Hi Guys, When I use the shortcode given for venue. I get all the venues instead of only the venue according to the event. Am I missing something. The code used Thanks in advance, |
Depending on where you’re trying to use this code, event->id may or may not be a defined variable. You can verify this by looking at the template code. I know in some of the templates the variable for the event ID is event_id. |
|
|
Hi Josh, Thanks for your answer. Looking at the code I only need to put ID in capital. Here is the code: $post_type = get_post_meta( $post->ID, ‘_single_post_type’, true ); |
|
Hello Raymond, That code is not related to the venue shortcode. The venue shortcode you provided should work, though you need to make sure it is all on one line. The get_post_meta will not work in an event, it isnt a true post type, so that may be why it isn’t working for you. |
|
Hi Dean, Thanks for the feedback. ESPRESSO_VENUE event_id=”‘.$event_id->ID.'” What do I need to check to get it working? Thanks in advance! |
|
$event_id is not a valid variable/array. it is $event. Can you clarify what you are trying to do please? And in what file/s? Thanks |
|
Hi Dean, Thanks. I’m trying to show up the venue details with the event. This is the code I used: |
|
Hi, OK, well it looks like what you linked is a Post rather than the event. If so, if an event has a venue attached to it, the Post should automatically show the address, so there is no need for the additional code. To show the venue in the event registration page, of the actual event http://bouwevents.nl/event-registration/?ee=2, you would just need to allocate a venue to the event and make sure that in the Template settings “Display the address in the registration form?” is set to Yes. I would suggest removing the code temporarily and making sure there isnt any additional Venue shortcodes in the event description and update the event, making sure that the “Add/Update post for this event?” at the bottom of the event editor is set to yes. |
|
Hi Dean, Thanks, I changed it as you mentioned. But how do I go about if I want to mention the venue(name) in the event (and eventually in the post) as well ? I would like to give the visitors the opportunity to go to venue(details/description) from within the event. And from that venue page see all the events taken place there. The reason I use post is that I can display them in a nice (blog) way. Thanks in advance! |
Hi Raymond, If you’re working with the event_post.php template, then you can use <?php echo do_shortcode(' [ESPRESSO_VENUE event_id="'.$event_ID.'" show_description=false show_additional_details=false show_map_image=false]');?> Note that you don’t need to include any parameters that you want returned as true, they are true by default. |
|
The support post ‘Adding Venue shortcode gives all venues instead of according Venue’ 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.