Skip to content

Instantly share code, notes, and snippets.

@thanosp
Created February 25, 2012 09:43
Show Gist options
  • Save thanosp/1907606 to your computer and use it in GitHub Desktop.
Save thanosp/1907606 to your computer and use it in GitHub Desktop.
skellie partial argument usage
<?php
query_posts(array(
'posts_per_page' => $this->limit?:10,
'category_name' => $this->categorySlug,
'paged' => get_query_var('paged')
));
if (have_posts()) {?>
<section class="categoryList">
<header><h2><?php echo $this->title?:'Archive'; ?></h2></header>
<?php
while (have_posts()) {
the_post();
echo $this->partial('preview', $this->categorySlug);
}?>
<?php if (!$this->hideFooter) { ?>
<footer><?php echo $this->partial('paginate', 'browse'); ?></footer>
<?php } ?>
</section>
<?php
}
wp_reset_query();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment