Home › Forums › Calendar Products › Events Calendar PRO › Customize the display of the event meta
- This topic has 11 replies, 7 voices, and was last updated 11 years, 5 months ago by
Barry.
-
AuthorPosts
-
August 2, 2013 at 7:38 am #58486
cakeandeatitdesigns
ParticipantHi,
I am working on customizing the display of the event meta information for a theme I am building and I am trying to change the output of tribe_get_the_event_meta(). I have two main goals at the moment. First, I need to replace the dt, dl, and dd tags with tags from my custom theme. Second, I need to remove the h3 tags that start each section. I would like one section for all the meta information.I have found this http://docs.tri.be/Events-Calendar/source-function-tribe_get_the_event_meta.html#312-327 in the documentation. Which shows a filter being applied on like 326. ‘apply_filters(‘tribe_get_the_event_meta’, $html)’. I can’t find where the code for that filter is in the core plugin. I think I can use that as a starting point and create my own function to handle this, I just can’t find it. Unless there is a better way to handle this. Thanks for all the help!
August 2, 2013 at 7:53 am #58491snorton
Participantcakeandeatitdesigns, Will this data be displayed on a single event page? You’ll probably want to create a template override. Make a copy of wp-content\plugins\the-events-calendar\views\single-event.php and place it in wp-content\themes\[your theme]\tribe-events\single-event.php.
Then, you can completely customize the display of the meta however you’d like. It would probably be easiest to just call each individual meta item.
August 8, 2013 at 6:41 am #59475cakeandeatitdesigns
ParticipantThanks for the response snorton. I have created the template override in my theme and have begun making my own template modifications that way. As far as displaying the meta info, is there documentation that lists all of the possible meta information? I was trying to use the built in plugin functions that loop through all the meta info so I wouldn’t have to write each one out, but it seems I can’t get enough customization that way.
August 8, 2013 at 7:26 am #59477snorton
ParticipantI’m not sure if there’s any one central location to determine all of the meta, but it’s all based on what you add into the post, so if you refer to docs.tri.be for each meta item you may want to display and then use conditional statements to display certain ways only if certain items need to be included then you should be able to cover all of your bases.
I bet there’s a way to utilize the tribe_get_meta tag and specify an array of meta items you want to display instead of doing one at a time, I wonder if @rob or @leah can find this out for us?August 9, 2013 at 6:09 am #59668cakeandeatitdesigns
ParticipantThanks for the help, I will keep reading over the docs to see what I can find. In the meantime, I have a different customization question. For the month view, I am trying to create a slightly different date picker than the one implemented in 3.0(nothing against the new one, it just doesn’t quite fit the design for this particular site). I am trying to get one dropdown for the month, and another one for the year. Are there ways to do this that are built in to the plugin? Thanks again for all the help!
August 12, 2013 at 9:48 am #59990Leah
Member@cakeandeatitdesigns, there is not a built in way to change the datepicker, no. You’d need to customize that yourself.
@Snorton, I’m not sure about your question, but lemme see if I can find out.August 16, 2013 at 4:51 pm #60854Neill
MemberHi cakeandeatitdesigns and Snorton,
So I jumped on after Leah asked me to take a look at this thread and then spoke with a developer about it.
There might be a cleaner way around this, and tell me if I’m missing something here, but the solution the developer came up with was utilizing: tribe_set_the_meta_template()
An example of how we can use this is here in this gist: https://gist.github.com/neillmcshea/6254480
So this is an example of how it can be used and it can be used to hook into ‘tribe_events_single_event_meta_templates’ and ‘tribe_events_single_event_meta_group_templates’ to change the tags.
Hopefully this is a pointer in the right direction. Let me know if there’s anything I missed.
Neill
August 20, 2013 at 7:16 am #61558cakeandeatitdesigns
ParticipantThanks for the help! I ended up echoing each piece of meta data as I needed it for this project as we were on a deadline. However, I have a couple more projects I am working on where we are using this plugin so I will try out the technique there and let you know how it worked!
August 26, 2013 at 10:12 am #62810Rob
MemberHeck yeah! Thanks for confirming as much. We’d love to hear the experience as you jump into it…and thanks for your patience/support so far, too.
September 3, 2013 at 9:55 am #64277Rob
MemberSince it’s been a couple weeks of inactivity here, I’m going to close the thread. But if you find yourself willing to share your experience going forward or need further help…please don’t hesitate to create a new thread. Cheers!
November 17, 2014 at 2:04 pm #888299chrisplyon
ParticipantCan someone post an example of their customized template so I can see how the functions are being called?
November 17, 2014 at 3:31 pm #888374Barry
MemberHi there chrispylon,
It’s worth being mindful that some old threads like this (over a year old at this stage) may not be monitored by the original authors – so often it is best to create a fresh thread of your own and, if you need to, add a link to another thread like this one if it provides some extra context 🙂
Please also note that though it’s still technically possible to use some of the functions mentioned above they are all or mostly part of a system known as the meta walker which has now been deprecated and will probably be removed in an upcoming release … so I’d strongly advise against their use.
With that in mind I’ll go ahead and close this thread. Definitely feel free to post a new one, though, detailing what you’re trying to do and one of the team will be happy to at least point you in the right direction 🙂
Thanks again!
-
AuthorPosts
- The topic ‘Customize the display of the event meta’ is closed to new replies.
