EstudioJuridicoAlmagro_Web/www/index.php
2013-03-26 17:57:55 +00:00

60 lines
1.5 KiB
PHP

<?php
/**
* @package WordPress
* @subpackage Progressio
*/
get_header(); ?>
<?php if ( get_post_format(get_the_id()) ) : ?>
<header class="page-header">
<h1><?php
$format = get_query_var('format_filter');
echo $format ? sprintf(__('Post format: %s', 'wpv'), $format) : __('Legal Update', 'wpv');
?></h1>
</header>
<?php endif; ?>
<div class="clearfix">&nbsp;</div>
<div class="page-wrapper clearfix">
<article class="full">
<div class="page-content">
<?php
if($format) {
$formats = array('aside', 'audio', 'video', 'link', 'quote', 'image');
$post_formats_longname = array();
$query = array(
'tax_query' => array(
array(
'taxonomy' => 'post_format',
'field' => 'slug',
)
)
);
if($format == 'standard') {
foreach($formats as $f) {
$post_formats_longname[] = 'post-format-'.$f;
}
$query['tax_query'][0]['terms'] = $post_formats_longname;
$query['tax_query'][0]['operator'] = 'NOT IN';
} else {
$query['tax_query'][0]['terms'] = array('post-format-'.$format);
$query['tax_query'][0]['operator'] = 'IN';
}
query_posts($query);
unset($GLOBALS['wp_the_query']);
$GLOBALS['wp_the_query'] =& $GLOBALS['wp_query'];
}
?>
<?php get_template_part( 'loop', 'index' ); ?>
</div><!-- #post-## -->
</article>
</div>
<?php get_footer(); ?>