Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * The main template file.
- *
- * Template name: News-Benelux
- *
- * This is the most generic template file in a WordPress theme
- * and one of the two required files for a theme (the other being style.css).
- * It is used to display a page when nothing more specific matches a query.
- * E.g., it puts together the home page when no home.php file exists.
- * Learn more: http://codex.wordpress.org/Template_Hierarchy
- *
- * @package sparkling
- */
- get_header('slider'); ?>
- <div id="primary" class="content-area">
- <main id="main" class="site-main" role="main">
- <?php
- $args = array( 'post_type' => 'post',
- 'category_name' => 'benelux-news',
- 'posts_per_page' => 6,
- 'paged' => $paged );
- query_posts( $args );
- ?>
- <?php global $region; /* global $wp_query;
- $explode = explode('/', $wp_query->query['pagename']);
- $region = $explode[0];
- $args = array(
- 'category_name' => $region,
- 'posts_per_page'=> 6,);
- query_posts( $args );
- ?><?php */?>
- <?php /*?> <?php global $region;
- $args = array(
- 'category_name' => $region,
- 'posts_per_page'=> 6,
- );
- query_posts( $args );
- ?><?php */?>
- <?php /* Start the Loop */ ?>
- <?php while ( have_posts() ) : the_post(); ?>
- <?php get_template_part( 'template-parts/content', get_post_format() ); ?>
- <?php endwhile; // end of the loop. ?>
- <?php sparkling_paging_nav(); ?>
- </main><!-- #main -->
- </div><!-- #primary -->
- <?php get_sidebar( $region ); ?>
- <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement