cart->get_cart_contents_count();if (is_front_page()){ $context['post'] = new TimberPost(); $posts_query_lessons = array( 'post_type' => 'danslessen', 'orderby' => 'title', 'order' => 'ASC', 'post_status' => 'publish' ); $context['lessons'] = Timber::get_posts($posts_query_lessons); $posts_query = array( 'posts_per_page'=> 3, 'post_type' => 'post', 'orderby' => 'date', 'order' => 'DESC', 'post_status' => 'publish' ); $context['posts'] = Timber::get_posts($posts_query); $template = ['home.twig'];}else if (is_page()){ $context['post'] = new TimberPost(); $context['myId'] = $post->ID; $context['tree'] = wpse_nav_menu_2_tree($menuID); $template = ['page.twig'];}else if (is_home()){ $context['post'] = new TimberPost(); $posts_query = array( 'post_type' => 'post', 'orderby' => 'date', 'post_status' => 'publish', 'paged' => $paged ); $context['posts'] = Timber::get_posts($posts_query); $template = ['blog.twig'];}else if (is_singular('danslessen')){ $context['post'] = new TimberPost(); $template = ['single-danslessen.twig'];}else if (is_singular('showarchief')){ $context['post'] = new TimberPost(); $template = ['single-showarchief.twig'];}else if (is_singular('team')){ $context['post'] = new TimberPost(); $template = ['single-team.twig'];}else if (is_single()){ $context['post'] = new TimberPost(); $template = ['single.twig'];}else if (is_post_type_archive()){ $context['post'] = new TimberPost(); $context['posts'] = Timber::get_posts(); $context['myId'] = $post->ID; $context['tree'] = wpse_nav_menu_2_tree($menuID); $template = ['archive.twig'];}else if (is_category()){ $context['post'] = new TimberPost(); $context['posts'] = Timber::get_posts(); $context['title'] = single_cat_title('', false); $template = ['category.twig'];}else if (is_404()){ $template = ['errors/404.twig'];}Timber::render($template, $context);?>