The Events Calendar featured image as body background?

<?php $id = get_the_ID(); if (has_post_thumbnail( $id ) ): $thumb = get_the_post_thumbnail_url($id, ‘full’); elseif (tribe_event_featured_image( $id)): $thumb = tribe_event_featured_image( $event_id, ‘large’, false, false ); else: $thumb = get_template_directory_uri().’/images/background.jpg’; endif;?> <body <?php body_class(); ?> style=”background-image: url(‘<?php echo $thumb;?>’); background-size: cover;”> ?> Also you don’t actually need the elseif statement, tribe_event_featured_image is a wrapper for the post … Read more

the-events-calendar, pagination with tribe_get_events()

Set the offset manually. $offset = ( get_query_var( ‘page’ ) ) ? get_query_var( ‘page’ ) : my_parse_url_for_offset(); function my_parse_url_for_offset() { if( strpos( $_SERVER[‘REQUEST_URI’], ‘/page/’ ) !== false ) { $url = explode( “https://wordpress.stackexchange.com/”, $_SERVER[‘REQUEST_URI’] ); $url_c = count( $url ); for( $i = 0; $i < $url_c; $i++ ) { if( $url[$i] == ‘page’ ) … Read more

The Events Calendar: Events page as Home page [closed]

You should be able to use the code from this answer: https://wordpress.stackexchange.com/a/96068/10 $homepage = get_page_by_title( ‘Events’ ); if ( $homepage ) { update_option( ‘page_on_front’, $homepage->ID ); update_option( ‘show_on_front’, ‘page’ ); } Haven’t tested it with multisite, but my guess is that it should work as advertised.

Only show posts from the last trailing 12 months

This is how I did it in the end – <?php $post_args = array( ‘post_type’ => ‘tribe_events’, ‘eventDisplay’=>’custom’, ‘start_date’ => date( ‘Y-m-d H:i:s’, strtotime( ‘-365 days’ ) ), ‘tax_query’ => array( array( ‘taxonomy’ => ‘tribe_events_cat’, ‘field’ => ‘slug’, ‘terms’ => ‘management-leadership’, ), ), ‘meta_query’ => array( array( ‘key’ => ‘associated_people’, ‘value’ => $current_user, ‘compare’ => … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)