Trying to get events integrated with blog posts by following suggestions on another thread.
add_action( ‘pre_get_posts’, events_in_main_query’ );
function events_in_main_query( $query ) {
if ( $query->is_main_query() ) {
$query->set( ‘post_type’, array( ‘post’, ‘tribe_events’) ); return $query;
}
}
Using Genesis and only references to blog is this in loops.php (see below) – I’m not sure what needs to replace main_query with to make it work.
function genesis_do_loop() {
if ( is_page_template( ‘page_blog.php’ ) ) {
$include = genesis_get_option( ‘blog_cat’ );
$exclude = genesis_get_option( ‘blog_cat_exclude’ ) ? explode( ‘,’, str_replace( ‘ ‘, ”, genesis_get_option( ‘blog_cat_exclude’ ) ) ) : ”;
$paged = get_query_var( ‘paged’ ) ? get_query_var( ‘paged’ ) : 1;
//* Easter Egg
$query_args = wp_parse_args(
genesis_get_custom_field( ‘query_args’ ),
array(
‘cat’ => $include,
‘category__not_in’ => $exclude,
‘showposts’ => genesis_get_option( ‘blog_cat_num’ ),
‘paged’ => $paged,
)
);
genesis_custom_loop( $query_args );
} else {
genesis_standard_loop();
}
}
to view site while under construction: parentsinpartnership.net/parents