This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // Add this to your functions.php file to create a venue query that queries venues in order of number of events. | |
| // You may need to add a limit statement if you want more events to be returned than the default for the query. | |
| add_filter( 'pre_get_posts', 'my_function_to_get_venues_by_event_numbers', 10, 1 ); | |
| function my_function_to_get_venues_by_event_numbers( $query ) { | |
| if ( $query->tribe_is_event_venue && !is_single() ) { | |
| $query = new WP_Query(); | |
| $tribe_query = new TribeEventsQuery(); | |
| $query->query_vars['post_type'] = TribeEvents::VENUE_POST_TYPE; | |
| add_filter( 'posts_fields', 'my_posts_fields_for_venues_function', 20, 1 ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /*-----------------------------------------------------------------------------------*/ | |
| /* Modify Event List Order in Admin | |
| /*-----------------------------------------------------------------------------------*/ | |
| function set_custom_post_types_admin_order($wp_query) { | |
| if (is_admin()) { | |
| // Get the post type from the query | |
| $post_type = $wp_query->query['post_type']; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <h1>January 2013</h1> | |
| <?php | |
| global $post; | |
| $current_date = '2013-01-01'; | |
| $end_date = '2013-01-31'; | |
| echo '<p>Start Date: ' . $current_date . '</p>'; | |
| echo '<p>End Date: ' . $end_date . '</p>'; | |
| $get_posts = tribe_get_events(array('start_date'=>$current_date,'end_date'=>$end_date,'posts_per_page'=>10) ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $args = array( | |
| 'post_status'=>'publish', | |
| 'post_type'=>'tribe_venue', | |
| 'posts_per_page'=>-1 | |
| ); | |
| $get_posts = null; | |
| $get_posts = new WP_Query(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <ul> | |
| <?php | |
| $args = array( | |
| 'post_status'=>'publish', | |
| 'post_type'=>'tribe_organizer', | |
| 'posts_per_page'=>-1, | |
| 'order'=>'ASC', | |
| 'orderby'=>'title' | |
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT SUBSTRING_INDEX(SUBSTRING_INDEX(wp_posts.post_title, ' ', 1), ' ', -1) as memberfirst, | |
| SUBSTRING_INDEX(SUBSTRING_INDEX(wp_posts.post_title, ' ', 2), ' ', -1) as memberlast, | |
| wp_postmeta.meta_value | |
| FROM wp_posts, wp_postmeta | |
| WHERE wp_posts.ID = wp_postmeta.post_id | |
| AND wp_posts.post_type = 'member' | |
| AND wp_posts.post_status = 'publish' | |
| AND wp_postmeta.meta_key = 'email' | |
| AND wp_postmeta.meta_value != '' | |
| ORDER BY wp_posts.post_date DESC |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| http://tri.be/support/forums/topic/calendar-widget-4/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if(isset($pagecustoms['zeitgeist_header_title'])) { | |
| $htitle = $pagecustoms['zeitgeist_header_title']; | |
| } elseif( tribe_is_month() && !is_tax() ) { // The Main Calendar Page | |
| $htitle = 'Events Calendar'; | |
| } elseif( tribe_is_month() && is_tax() ) { // Calendar Category Pages | |
| $htitle = 'Events Calendar: ' . tribe_meta_event_category_name(); | |
| } elseif( tribe_is_event() && !tribe_is_day() && !is_single() ) { // The Main Events List | |
| $htitle = 'Events List'; | |
| } elseif( tribe_is_event() && !tribe_is_day() && !is_single() && is_tax() ) { // Category Events List | |
| $htitle = 'Events List: ' . tribe_meta_event_category_name(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $args = array( | |
| 'post_type' => array(TribeEvents::POSTTYPE), // use post_type IN () to avoid old tribe queries | |
| 'posts_per_page' => -1, | |
| 'order' => 'ASC', | |
| 'meta_query' => array( | |
| array( | |
| 'key' => '_EventOrganizerID', | |
| 'value' => get_the_ID(), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| add_action( 'pre_get_posts', 'include_private_events' ); | |
| function include_private_events( $query ) { | |
| if ( $query->query_vars['post_type'] == TribeEvents::POSTTYPE && $query->query_vars['eventDisplay'] == 'month' && !is_tax(TribeEvents::TAXONOMY) && empty( $query->query_vars['suppress_filters'] ) ) { | |
| $query->set( 'post_status', | |
| array( | |
| 'publish', | |
| 'private' | |
| ) | |
| ); |