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

Using variables as href in anchor tags (PHP) [closed]

It’s not really a WordPress related question, but it’s a simple one. The tribe_get_event_website_link() function you are using outputs a full link. You can use SimpleXML to extract the href part and then use it later. It’s as simple as this: $website = tribe_get_event_website_link(); $xml = new SimpleXMLElement( $website ); echo ‘<a href=”‘ . $xml[‘href’]. … Read more

Pagination for event query

posts_nav_link() works off the main query. Instead of invoking your own $upcoming, just use query_posts( … ) to temporarily overwrite it, and the corresponding template tags… query_posts( array( ‘post_type’ => ‘tribe_events’, ‘eventDisplay’ => ‘upcoming’, ‘posts_per_page’ => 1, ) ); if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <?php tribe_get_template_part( ‘list/single’, ‘event’ … Read more