Adding the code to the parent theme’s functions.php only made things worse – my site and admin don’t load – a 500 error is returned by the browser. I fixed it by removing the code via FTP. I also tried this code, but to no avail:
function my_get_posts( $query ) {
if ( is_home() && $query->is_main_query() )
$query->set( 'post_type', array( 'post','event' ) );
return $query;
}
add_filter( 'pre_get_posts', 'my_get_posts' );