Functions.php

add_filter( 'get_the_archive_title', function ($title) {    
    if ( is_category() ) {    
            $title = single_cat_title( '', false );    
        } elseif ( is_tag() ) {    
            $title = single_tag_title( '', false );    
        } elseif ( is_author() ) {    
            $title = '<span class="vcard">' . get_the_author() . '</span>' ;    
        } elseif ( is_tax() ) { //for custom post types
            $title = sprintf( __( '%1$s' ), single_term_title( '', false ) );
        } elseif (is_post_type_archive()) {
            $title = post_type_archive_title( '', false );
        }
    return $title;    
});
add_image_size( 'blokken', 575, 575 );
add_post_type_support( 'page', 'excerpt' );
function show_all_future_posts($posts)
{
   global $wp_query, $wpdb;

   if(is_single() && $wp_query->post_count == 0)
   {
      $posts = $wpdb->get_results($wp_query->request);
   }

   return $posts;
}
add_filter('the_posts', 'show_all_future_posts');
function change_page_menu_classes($menu)
{
    global $post;
	$categories = get_the_category();
	$cat_slug = $categories[0]->slug;
    if ($cat_slug == 'activiteiten')
    {
        $menu = str_replace( 'current-menu-item', '', $menu );
        $menu = str_replace( 'menu-item-9028', 'menu-item-9028 current-menu-item', $menu );
    }
    if ($cat_slug == 'evenementen')
    {
        $menu = str_replace( 'current-menu-item', '', $menu );
        $menu = str_replace( 'menu-item-9147', 'menu-item-9147 current-menu-item', $menu );
    }
    return $menu;
}
add_filter( 'nav_menu_css_class', 'change_page_menu_classes', 10,2 );
// Automatic Update for All WordPress Plugins
add_filter( 'auto_update_plugin', '__return_true' );