Home › Forums › Calendar Products › Events Calendar PRO › RSS feed that includes everything about the event
- This topic has 9 replies, 2 voices, and was last updated 13 years, 6 months ago by
Jonah.
-
AuthorPosts
-
October 1, 2012 at 7:46 pm #25965
Victor
ParticipantHi,
I have successfully added events to my rss feed based on the above codes in this old post, https://theeventscalendar.com/how-to-add-events-to-your-rss-feed/ But how do I get the rest of the information of an event? I need the rss feed to include event name, event image, event date, description, and link.I get that in line 6 of the code in the old post:
$args[‘post_type’] = array(‘post’, ‘tribe_events’);
pull in the event post date (post) and event name (tribe_events)So what are the coded names for event image, event date, description, and link?
or if you have the codes ready for pulling all the info of an event, that would suffice as well.And please note that my entire site is the calendar, so there aren’t any other types of posts besides the events.
Thanks!
October 1, 2012 at 9:15 pm #25968Jonah
ParticipantHey Victor,
Event name is just a regular WordPress post title so you can get it with get_the_title() or the_title(). Event image is just the post_thumbnail so you can use the native WP get_the_post_thumbnail() or the_post_thumbnail(). Event date can be obtained using our template tags – tribe_get_start_date() and tribe_get_end_date() – more info on those here: https://theeventscalendar.com/support/documentation/the-events-calendar-template-tags-date-functions/. And link can be obtained with tribe_event_link() – more info on that here: https://theeventscalendar.com/support/documentation/the-events-calendar-template-tags-link-functions/#functiontribe_event_link
I hope that helps!
– Jonah
October 1, 2012 at 9:51 pm #25969Victor
ParticipantThanks, but I’m really not familiar with php codes.
I was only able to have the rss that I have is from the codes you provided in that old post. How do I incorporate these tags you listed into an rss pull? The below that I made up probably isn’t correct. Please let me know the correct code. Thank you!
function add_events_to_rss_feed( $args ) {
if ( isset( $args[‘feed’] ) && !isset( $args[‘post_type’] ) )
$args[‘post_type’] = array(‘the_title’, ‘the_post_thumbnail’, ‘tribe_get_start_date’, ‘tribe_event_link’);
return $args;
}
add_filter( ‘request’, ‘add_events_to_rss_feed’ );October 2, 2012 at 10:05 am #25987Jonah
ParticipantHi Victor,
To customize the actual feed and add custom fields you will need to look into http://codex.wordpress.org/Customizing_Feeds – this is not something we can help you with other than just pointing you in the right direction.
Cheers,
JonahOctober 2, 2012 at 11:12 am #25994Victor
ParticipantThanks, Jonah.
But this is somewhat disappointing considering that “Full RSS Feed” is listed on your event calendar description page. https://theeventscalendar.com/wordpress-events-calendar/ And yet, it’s not really shown how to create/get to that. All I’m asking for in the feed is just the pertinent details of an event post.
I honest don’t even know what to start with that link you sent me since I’m unfamiliar with php codes. Please if you can provide a better clue for me, it will be much appreciated. Or if you can point me to some examples that people have created a similar feed?
Thanks!
October 2, 2012 at 11:20 am #25995Jonah
ParticipantHi Victor,
We do offer a full feed that is separate from the main WordPress feed and can be accessed via http://yourdomain.com/events/feed
Unfortunately I have no examples for customizing events in the main WordPress feed. You’ll need to read through the link I sent you and/or search on Google for articles that may provide examples of this.
I hope that helps.
– Jonah
October 2, 2012 at 11:36 am #25997Victor
Participanthmm… I think that may just be what I need. But that link doesn’t seem to work. Is there something I need to turn on?
http://creativepulsechicago.com/events/feed
And do you know if that would include the items that I was looking for, such as event date (and not post date)?Thanks!
October 2, 2012 at 11:53 am #25998Jonah
ParticipantHey Victor,
Sorry, since you don’t have pretty permalinks enabled, please try this link instead: http://www.creativepulsechicago.com/?post_type=tribe_events&feed=rss
– Jonah
October 2, 2012 at 9:16 pm #26016Victor
ParticipantThanks Jonah.
I was hoping that would have included the event date and such, but it just gave me the same feed as the previous one. I will read up on that custom feed stuff and try to create one of my own. Thanks for the tips!
October 3, 2012 at 8:40 am #26029Jonah
ParticipantHi Victor,
That’s strange, it should show the event info in the feed – are you running the latest version of the plugin? Have you tried deactivating all other plugins to see if that helps? Do you have both The Events Calendar and PRO activated? Maybe try setting your permalinks in Settings > Permalinks to Postname to see if that helps…
Let me know how that goes.
– Jonah
-
AuthorPosts
- The topic ‘RSS feed that includes everything about the event’ is closed to new replies.
