• Resolved texhost

    (@texhost)


    We have successfully added the following code to the functions.php.

    add_filter( 'pre_get_posts', 'my_get_posts' );
    function my_get_posts( $query ) {
    	if ( is_home() && false == $query->query_vars['suppress_filters'] ){
    		$query->set( 'post_type', array( 'post', 'event' ) );
    		$query->set('category_in', array(33));
    		$query->set( 'post_type', array( 'post', 'event-recurring' ) );
    		$query->set('category_in', array(33));
    }
                    return $query;
    }

    The intent is to only present events and recurring events in category 33 to post on the home page. Only the normal events that are in category 33 are displayed on the index page, but the recurring events on are displaying despite the code placed in the functions.php. Any ideas?

    http://wordpress.org/extend/plugins/events-manager/

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Events and Recurring Events as posts’ is closed to new replies.