Integrate events with blog

Home Forums Welcome! Pre-Sales Questions Integrate events with blog

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1020820
    amy
    Guest

    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

    #1020840
    Brian
    Member

    Hi,

    Thanks for using the Events Calendar.

    Here on the pre-sales forum, I’m afraid we do not provide technical support. I would ask that you take any technical support questions across to our wordpress.org forum – our staff scan it periodically and other community members may also be able to help out.

    The Events Calendar

    Thanks again!

Viewing 2 posts - 1 through 2 (of 2 total)
  • The topic ‘Integrate events with blog’ is closed to new replies.