wordpress/php-fpm/wordpress_files/themes/sd-bushwick/index.php

69 lines
2.1 KiB
PHP
Raw Permalink Normal View History

2020-05-22 03:40:23 +02:00
<?php
/**
* The main template file.
*
* 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 Bushwick
*/
get_header(); ?>
<div id="primary" class="content-area">
<?php get_template_part( 'navigation' ); ?>
<main id="main" class="site-main" role="main">
<?php // LOOP LOCAL CONTENT
$args1 = array(
'author__not_in'=> array(142), //Authors's id's you like to not include
'posts_per_page' => '3',
);
$local_content = new WP_Query($args1);
if($local_content->have_posts()) :
while($local_content->have_posts()) :
$local_content->the_post();
get_template_part( 'content', 'preview' );
endwhile;
else:
echo "Oops, there are no posts.";
endif;
?>
<div class="navigation">
<div class="read-more-section"><?php echo '<a href="'.get_site_url().'/sd/">M&aacute;s contenidos</a>';?></div>
</div>
<?php // LOOP AGGREGATED CONTENT
echo '<div class="section-title">contenidos agregados</div><hr class="section-separator" />';
$args2 = array(
'author__in'=> array(142), //Authors's id's you like to include
'posts_per_page' => '5',
);
$aggregated_content = new WP_Query($args2);
if($aggregated_content->have_posts()) :
while($aggregated_content->have_posts()) :
$aggregated_content->the_post();
get_template_part( 'content', 'preview-aggregated' );
endwhile;
else:
echo 'Oops, there are no posts.';
endif;
?>
<div class="navigation">
<div class="read-more-section"><?php echo '<a href="'.get_site_url().'/agregado/">M&aacute;s contenidos agregados<a>';?></div>
</div>
</main><!-- #main -->
</div><!-- #primary -->
<?php get_footer();