How do I set a custom post type Category after import using wp_set_post_terms
The answer is don’t use wp_set_post_terms, use wp_set_object_terms instead. wp_set_post_terms only works with the built-in post object.
The answer is don’t use wp_set_post_terms, use wp_set_object_terms instead. wp_set_post_terms only works with the built-in post object.
WP Plugin: The events calendar show organizers featured Image if the events featured image is empty
The Events Calendar date in WP Query Loop
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
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
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
I discovered the answer: The new version of WordPress using version 1.6 of JQuery. In the file events-meta-box.php, change anywhere where it says: .attr(‘checked’) == true to: .prop(“checked”, true) There should be three locations where you fix it.
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
How to set up year view for datepicker in The Events Calendar plugin?
Since you know you want only the first one and you’re not using a typical loop, you’re already using an array of posts, you can just do setup_postdata($events[0]); and then get your data from the first item here then continue your loop as written if it’s working as happily as expected.