The Events Calendar EventURL not displaying

You problem likely results from the tribe_events_get_the_excerpt() function calling wp_reset_postdata(), which resets the global $post object back to the original query (i.e., the page the footer is on). get_the_ID() returns the ID of the global $post object, so you will get the page’s ID instead of the event’s from within the loop. And setup_postdata() does … Read more

Query only past events and only future events in the event calendar

For Past events: I have used date functino according to the time zone. Another date can also be added to the wp query. date_default_timezone_set(‘America/Winnipeg’); $date2 = date(‘y-m-d h:i’); $pastEvents = tribe_get_events( [ ‘start_date’ => ‘2014-10-01 00:01’, ‘end_date’ => $date2, ‘posts_per_page’ => 10, ] ); For Future events: $pastEvents = array( ‘post_type’ => ‘tribe_events’, ‘post_status’ => … Read more

How to see if event is featured in PHP? [closed]

I believe you would want to use this function (from the-events-calendar/src/Tribe/Featured_Events.php:45): /** * Confirms if an event is featured. * @param int|WP_Post $event * * @return bool */ public function is_featured( $event = null ) { $event_id = Tribe__Main::post_id_helper( $event ); if ( ! $event_id ) { return false; } return (bool) get_post_meta( $event_id, self::FEATURED_EVENT_KEY, … Read more

I use the events Calendar Plugin and I want to change some words

The “Now onwards” string is translated with _x() which is different than __() because it allows context to be added to the string being translated. Because there is context, you need to use gettext_with_context instead of gettext. Here’s a simple example based on the one in the WP.org Code Reference: function example_gettext_with_context( $translated, $text ) … Read more