get_template_part('category-one-issue'); } else { $content_type = Scientific2016ContentType::Articles; if (is_tag(ARTICLES_TAG_SLUG)) { $content_type = Scientific2016ContentType::Articles; } elseif (is_tag(FAST_SCIENCE_TAG_SLUG)) { $content_type = Scientific2016ContentType::Fast_science; } elseif (is_tag(COLUMNS_OPINIONS_TAG_SLUG)) { $content_type = Scientific2016ContentType::Opinions; } set_query_var('content_type', $content_type); ?> <header class="page-header"> <?php scientific_2016_the_archive_title('<h1 class="page-title ' . scientific_2016_get_archive_title_class() . '">', '</h1>'); the_archive_description('<div class="taxonomy-description">', '</div>'); ?> </header><!-- .page-header --> <?php /* Start the Loop */ ?> <?php while (have_posts()) { the_post(); ?> <?php /* * Include the Post-Format-specific template for the content.
<?php /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ scientific_2016_the_archive_title('<h1 class="page-title">', '</h1>'); if (isset($issue_sub_categories)) { // show the issue posts by category foreach ($issue_sub_categories as $issue_sub_category) { $sub_cat_posts; // the first category's posts were already retrieved by WP, so just print them if (strpos(urldecode($issue_sub_category->slug), FIRST_CATEGORY_TO_SHOW_IN_ISSUE) > -1) { global $wp_query; $sub_cat_posts = $wp_query; set_query_var('content_type', Scientific2016ContentType::Articles); } else { // get the posts of the sub category and print them $sub_cat_posts = new WP_Query('cat=' . $issue_sub_category->cat_ID . '&posts_per_page=-1&orderby=name'); if (strpos(urldecode($issue_sub_category->slug), __('opinions', 'scientific-2016')) > -1) { set_query_var('content_type', Scientific2016ContentType::Opinions); } if (strpos(urldecode($issue_sub_category->slug), __('fast_science', 'scientific-2016')) > -1) { set_query_var('content_type', Scientific2016ContentType::Fast_science); } } scientific_2016_issue_posts($sub_cat_posts, $issue_sub_category); } }