Posted: August 28, 2012 at 12:28 pm
|
Hi. Attempting to integrate EE into our WordPress and have failed using custom templates. We may have a plugin conflict, I’m not sure. To get around this, we are using the Event Posts to share our event information. So far, it’s been fine. But there is one problem. The Venue Manager does not post it’s values to the Custom Fields when you export an event as a Post. If you disable the Venue Manager, and manually type in the address in the Venue fields, it works. As an organization with multiple locations, the Venue Manager is a reason we were excited about EE. Can this be addresses somehow? Is there a patch, or something I might be missing? Any help on this topic would be appreciated. |
|
It also looks like that the Event Post Custom Field for the Price of the event is missing as well. This would be essential to for us. Am I missing it, or can it be added easily? |
Have you tried using the venue shortcodes for venue information? |
|
Ditto the above for price shortcodes. You can embed these into the page template by wrapping the shortcode in a https://eventespresso.com/wiki/shortcodes-template-variables/ |
|
|
Chris, thank you! I have attempted the short codes in a non-EE templates with no luck. Fully php and do_shortcode wrapped versions and they have not worked. And my apologies, that is a point of clarification. We are attempting to pull in all the venue and pricing data into a standard wordpress template. In theory the shortcodes should still work, but haven’t. Since we are talking about the Event Posts, and not the event list/registration templates, do I need to specify the event_id somewhere in the Posts template to facilitate the shortcode? Thanks! All help is appreciated greatly! |
Yes, either shortcode will support the event_id parameter and that would be required if you are using them on a page that is not the event itself. So:
The first line (where $event_id is defined) is required to pull the event ID from the post meta so you can feed that into the shortcode. If you weren’t editing the template, you could do the same thing and manually add the event ID to the shortcode. |
|
|
Chris, this looks like what I needed! I will give this a try and post the results. Thank you! |
|
Chris, thanks! This works perfectly and has saved me tons of hassle. Thank you for your help and thank you for the code! |
|
One last thing. I have attempted using the same code for the EE_META, with no luck. I’ve added the event_id attribute to the EE_META shortcode, but that didn’t work. Here’s the code:
Any ideas on how to get this working? The price portion works perfectly, but the EE_META is not displaying. Any help you could provide would be amazing! Thanks! |
I’m assuming that the event_cventlink (sic?) meta key exists in your event? And it has a value? And that’s not a typo? |
|
|
Yes, that’s correct. It’s in there. |
What happens if you just use the EE_META shortcode in the post content? also: is this actually part of your code or is this cut off?
|
|
|
Chris, I’ve been working on the posts template all day, so the code changed a little. I switched it up and am using the event_externalURL to get the $event_cventlink now. But, the same problem exists. I am attempting to pull in a note about pricing that’s a EE_META value. Using either of the options below yields no results.
Here’s my current code.
Another way to solve this problem would be a short code in same family as EVENT_PRICE that would display the event price name. It there was a shortcode that displayed the EVENT_PRICE_NAME, that is exactly what I’m looking for. Right now, the only place to see the EVENT_PRICE_NAME is in the Event Price Dropdown in on the Registration page. We want to list those values. You’re help so far has been fantastic. Thank you. |
|
Here’s the line that keeps getting cut off for some reason.
|
That’s just weird because I know what you are doing is possible — I’m doing the same thing in this tutorial: https://eventespresso.com/wiki/selectively-hide-the-add-to-cart-link/#method-2 A different shortcode for EVENT_PRICE_NAME (or alternately trying to grab those values from the database) is probably opening up a can of worms that you don’t want to get into. At this point, doing so with what you have and pulling it from the db is slightly more reasonable (since you’re already getting the event_id) but there isn’t an existing shortcode that displays the price name. I will say, though, that this line isn’t really necessary:
You can get the same result by just doing this:
If $event_pricenote is empty, it will return false, so you don’t need to worry about the OR or if it has a null or empty value. I don’t think that’s your issue, though. |
|
|
Chris, thanks! I’ll look through the tutorial, more deeply. On quick glance though, it looks like it’s for the EE templates, which I’m not using. I’m using the WordPress templates, and using the short codes to bring in the EE data. Still, it’s odd that the custom fields would work, but the EE META fields would not. We should be able to move forward without this information. For right now, what I was putting this in place for is a rare bit of event information, that won’t be used on most events. So, we will skip it and move on. Thank you so much for your help. At minimum, I hope our thread here shows some areas of growth for EE when it comes to WordPress template integration. Thanks! |
That’s true, but you’re still using the shortcode which sort of supersedes what type of template you’re using and work regardless. (That’s kind of the whole point of shortcodes. And all the do_shortcode function does is let you put a shortcode into a php file and execute it as if it was in the_content — it doesn’t matter if that php file is a theme template file or anything else as long as WordPress is running.) One test you can try is just throwing the EE_META shortcode with a hard-coded event_id in an event and do the same in a post/page. It should work in either, if it’s not, something’s not working right. |
|
Oh! Also — another idea if you’re using the CPTs is adding a new custom field in the event post and then pulling that with get_post_meta. It wouldn’t be pulling it from the event, so it would be less automatic, though. The reason ee_meta doesn’t necessarily get passed over to the post type is that they aren’t exactly the same thing; we’re basically using ee_meta as if it were post meta, but since we’re not using the actual WordPress loop/post system for events, it’s a different thing. In the future, we’re planning on moving towards using post types for things, at which point this will be a non-issue. Hopefully before then we can sort of dump the ee_meta into custom post meta in event posts — the ee_meta functionality is still pretty new. |
|
The support post ‘Venue Manager and Custom Fields for Posts’ 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.