Support

Home Forums Event Espresso Premium Can't display Event Meta data

Can't display Event Meta data

Posted: September 17, 2012 at 8:48 am

Viewing 5 reply threads


Jenny Volvovski

September 17, 2012 at 8:48 am

Hi, I am trying to display custom meta data using the code below on a custom category page. Nothing is showing up.

?php echo do_shortcode('[EE_META type="event_meta" name="my_meta_key"]'); ?

All the other shortcodes are working correctly:

Do I need to define a new variable for the meta data, in order for that shortcode to work, the same way I am doing for the other shortcodes?

            $event_identifier = get_post_meta($post->ID, 'event_identifier', true);
    $event_id = get_post_meta($post->ID, 'event_id', true);

Please let me know. I originally set this up using an earlier version of EventEspresso, when the extra meta fields weren’t available.

Thanks, Jenny


Jenny Volvovski

September 18, 2012 at 6:06 pm

I thought I got this to work, but I didn’t.

The EE_Meta shortcode is working correctly on my single.php templates, but not on the archive.php template. Nothing is showing up.

Is there anything I have to do differently for it to work in the archive template? I am using WP_Query to run the loop that shows all the events.

Thanks,
Jenny


Jenny Volvovski

September 20, 2012 at 12:16 pm

Can someone take a look at this issue please? It’s the one thing preventing me from launching the upgraded version of the plugin.

Thanks very much!
Jenny


Dean

September 21, 2012 at 1:07 am

Hi Jenny,

Why not use the event_list_display.php template rather than archive.php? Its there to be used to display the event lists and when moved to the uploads/espresso/templates directory can be modifed to suit your needs.

The shortcode php code worked perfectly there for me.

I assume you worked out the code but just in case

echo do_shortcode('[EE_META type="event_meta" name="my_meta_key"]');

the my_meta_key should be replaced with the name of the meta field you want to show


Jenny Volvovski

September 21, 2012 at 7:22 am

Hi Dean,
Thanks – I got this to work with the [EVENT_LIST] shortcode.

Now I am running into a new problem.
I have my events set up as Posts, but the new event link goes to the registration page, not the Post for the specific event. Is there a way to get it to link to the post associated with it?

Here’s the old set up when I was using an archive.php and post.php template.
http://www.specimenproducts.com/classes-seminars/
http://www.specimenproducts.com/guitar-bass-setup-and-maintenance-course-oct/

Thanks,
Jenny


Dean

September 21, 2012 at 8:46 am

Hi Jenny,

Sorry but I think you may be looking at this slightly wrong. The Event List lists the Events, which are a custom post type specific to Event Espresso.

When you make an event and set it to create a post, you are basically duplicating the information, the post is a standard WordPress post and therefore works very well in a standard blog.

So the purpose of these posts is to enable you to advertise the events in different areas of the website – the events on the Events page (using the shortcode) and the posts will appear in the news feed for example.

You could probably hack the code to force [EVENT_LIST] to direct to the posts but it wasnt set up to do that.

Viewing 5 reply threads

The support post ‘Can't display Event Meta data’ 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