Home › Forums › Welcome! › Pre-Sales Questions › Display a single listed event using a php include or short code ?
- This topic has 5 replies, 3 voices, and was last updated 11 years ago by Leah.
-
AuthorPosts
-
February 12, 2013 at 7:30 pm #32565coreyParticipant
Hello,
I’m building a site for a client using headway themes. What the client would like is to have a single event title and time with a url to the signup page listed next to each article they post. The even would need to be the next upcoming event in a specific category depending on the topic of the article.
Is this something I can do with either a shortcode or a simple php include in either the basic or the pro version?Many thanks
February 14, 2013 at 10:10 am #32655JonahParticipantHey Corey,
This is definitely doable but something you’re going to need to do most of the legwork on. Essentially you’re going to want to either create a custom query or create a custom widget with the custom query that pulls in the event(s) you need. I’m not quite sure how you would approach pulling in the events from specific categories based upon the article title but using something like http://www.advancedcustomfields.com/ or http://wordpress.org/extend/plugins/posts-to-posts/ would be suggested plugins to help you achieve something like that.
For some examples of custom queries, take a look at our documentation: https://theeventscalendar.com/support/documentation/the-events-calendar-template-tags-general-functions/#functiontribe_get_events – you can also use WP_Query (http://codex.wordpress.org/Class_Reference/WP_Query) by specifying ‘tribe_events’ as the post type.
I hope that all helps!
– Jonah
February 14, 2013 at 11:08 am #32659coreyParticipantThanks
I didn’t see anything in the documentation about being able to use a short code. Ideally I’d like to simply put a shortcode with an event tag and have it display the most recent one.February 14, 2013 at 2:25 pm #32682JonahParticipantHi Corey,
Unfortunately we don’t have any shortcodes. So you’ll need to build a custom query for this. You could also use the Events List Widget as a base for what you are trying to build. You’ll need to build in the functionality for displaying a specific category based upon title, but the widget will at least display the next upcoming event for you.
I hope that helps!
– Jonah
March 11, 2013 at 10:09 pm #42328PaulGuestThat is a real shame! On the WP Plugin Repo you are tagged with ‘shortcodes’.
I downloaded and spent and hour on the plugin set up and then went looking for shortcodes to find there are none! You might need to update that…March 12, 2013 at 10:24 am #42392LeahMemberGood catch Paul! I’m sorry about wasting your time. I really appreciate that you let us know so we can fix that and save others the same effort.
~Leah
-
AuthorPosts
- The topic ‘Display a single listed event using a php include or short code ?’ is closed to new replies.