Home › Forums › Calendar Products › Events Calendar PRO › Shortcode or modify widget? Loop?
- This topic has 17 replies, 3 voices, and was last updated 8 years, 3 months ago by
Claire Brunner.
-
AuthorPosts
-
November 29, 2017 at 7:30 am #1394795
Claire Brunner
ParticipantI’ve been searching through the forums/knowledgebase since last night and can’t seem to find an answer so I thought I’d post here.
I have a site I’m building for a client that has 19 different locations. We have made 19 pages for each of these locations and we need to display 3 events for that specific location, one featured event (utilizing a category called “featured”) and two other events with a link to a page that shows all of the locations for that location (venue). I need the featured image for each event to show.
I’ve tried a variety of shortcodes (which gets close) and the widget (which isn’t ideal because I’d have to make 38 sidebars to put that widget), and I still am not getting the result I am looking for.
Is this a WP_Query need?
November 29, 2017 at 11:18 am #1395157Claire Brunner
ParticipantAnother thought I had is to not use the venues part at all and just use a category for each location, but still leaves me with unsure of how to approach this.
November 30, 2017 at 8:44 am #1395878Claire Brunner
ParticipantAnyone?
November 30, 2017 at 10:45 am #1395967Victor
MemberHi Jessica!
Thanks for getting in touch with us! I’ll be happy to help you with this topic.
First, I apologise for the delay in getting back to you. We’ve been dealing with higher demand than usual in our forums and that caused some delays.
I’m not really sure you’ll be able to use shortcodes to accomplish exactly what you are looking for. Have you tried the [tribe_featured_venue] shortcode? > https://theeventscalendar.com/knowledgebase/pro-widget-shortcodes/#featured-venue-shortcode
The most customizable solution probably would be to build a custom page template for that purpose. You could make use of the tribe_get_events() helper function to achieve that > https://theeventscalendar.com/knowledgebase/using-tribe_get_events/
I hope that helps. Let me know if you have any follow up questions.
Best,
VictorNovember 30, 2017 at 12:07 pm #1396036Claire Brunner
ParticipantThe venue shortcode doesn’t seem to display images, so I can’t used that.
I can’t use tribe_get_events() unless there is a way for me to select in the CMS the id for that venue. tribe_get_events() works to display if I individually put in a venue ID but I don’t want to create 19 location page templates to display it. If I do, my client can’t add a location without asking me to be involved.
November 30, 2017 at 5:08 pm #1396226Tamara Pickrell
ParticipantClaire,
Do you already know about the other shortcode option, the Events Calendar Shortcode plugin? It provides many more options than the TEC native shortcode, including featured image and filtering by venue ID. I don’t fully understand your scenario, but maybe this would be able to do what you want.
December 1, 2017 at 8:02 am #1396619Claire Brunner
ParticipantTamara,
I haven’t seen that plugin before but what I am needing is to show a featured event with 2 non-featured images below it for a specific venue on a page that is one of 19 location pages. So in essence, 19 locations pages with these three event sections.Would you say this is what I need to use? I see it’s only $29, but have you used it and does it sound like it would solve my need?
-
This reply was modified 8 years, 4 months ago by
Claire Brunner.
December 4, 2017 at 7:39 am #1397785Claire Brunner
ParticipantTamara/Victor,
Haven’t heard from y’all since last week. Can you check my replies to your responses and continue help?Pretty disappointed in the response from the support team on this issue.
December 4, 2017 at 7:47 am #1397788Victor
MemberHi Jessica & Tamara!
Thanks for following up with this. Let me try to help you further.
I can’t use tribe_get_events() unless there is a way for me to select in the CMS the id for that venue.
You could build a customization where you would prompt the user to input the venue ID when choosing that custom template and save that as a custom field for the page. Then you could use this custom field inside the template to display the information dynamically.
Of course, that is something that would require some custom coding in place, for which we are limited in the support we can give. That said, if you decide to go that way and bump into any questions I’d be happy to help as much possible.
I’m not really familiar with the plugin Tamara shared, but you might want to give it a try and see if it helps achieve what you are looking for.
Thank you Tamara for chiming in to suggest that other plugin!
Best,
VictorDecember 4, 2017 at 8:09 am #1397831Claire Brunner
ParticipantHi Victor,
If I’m understanding you right, what you are suggesting is a custom field which would be called in the loop, right? If so, is there any specifics I should know about in the loop? I’m familiar with the WP_Query/get_posts loop, but I’m just checking if there is anything specific to the tribe_events itself I should be aware of.Tamara – I’d love to hear your thoughts on that plugin. They don’t have a free version, so I don’t want to drop $29 without hearing from someone.
December 5, 2017 at 7:21 am #1398575Victor
MemberHi Jessica!
Yes, you could use that custom field to contain the venue ID from where you are trying to fetch events from, and pass it as an argument to the tribe_get_events() function. As a reference, you can use it as a custom field parameter as the _EventVenueID is a postmeta for the event > https://codex.wordpress.org/Class_Reference/WP_Query#Custom_Field_Parameters.
Additionally, here are some other examples of how to use the tribe_get_events() function > https://theeventscalendar.com/knowledgebase/custom-event-queries/
I hope that helps you get started. Let me know if you have any follow up questions.
Best,
VictorDecember 5, 2017 at 11:48 am #1398927Tamara Pickrell
ParticipantClaire,
If you read through the descriptions of the shortcode options you can imagine how your data structure could be applied. All I can say, with the little I know of your scenario, is that I could set up shortcodes with my data that would produce the result you are describing.
There is a free version you can try (see image), and the developer is very responsive to questions.
@Victor, I think all the MT staff on these forums should have some kind of indicator on their name or photo so that it’s clear who is responding officially and who’s not.December 6, 2017 at 5:41 am #1399332Victor
MemberHi Tamara!
We really appreciate you helping out with this topic and for the suggestion about the staff indicator. I will make sure to pass your comment along to the team so we can take it into account.
Best,
VictorDecember 6, 2017 at 6:24 am #1399365Claire Brunner
ParticipantThanks for each of your continued response.
Tamara – the free version seemed to not really even work. Not sure if it is something with my system, but I’m going to dive into it more today.
Victor – going give your route a try today and see where we are at.
December 6, 2017 at 7:14 am #1399400Claire Brunner
ParticipantFYI, I accidentally clicked correct answer above and can’t seem to unclick it. I’ll report back with my findings later today.
-
This reply was modified 8 years, 4 months ago by
-
AuthorPosts
- The topic ‘Shortcode or modify widget? Loop?’ is closed to new replies.
