Created
February 13, 2013 01:03
-
-
Save elclanrs/4782705 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
$paged = get_query_var('paged') ? get_query_var('paged') : 1; | |
$query = new WP_Query([ | |
'post_type' => ['articles', 'projects', 'tips'], | |
'orderby' => 'date', | |
'posts_per_page' => 7, | |
'paged' => $paged | |
]); | |
?> | |
<? while($query->have_posts()): $query->the_post() ?> | |
<article class="post"> | |
<h2><? the_title() ?></h2> | |
<p><? the_excerpt() ?></p> | |
<ul> | |
<? foreach($categories as $cat): ?> | |
<li class="category"><a href="#"><?= $cat->name ?></a></li> | |
<? endforeach ?> | |
</ul> | |
</article> | |
<? endwhile ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment