git-svn-id: https://192.168.0.254/svn/Proyectos.EstudioJuridicoAlmagro_Web/trunk@4 c22fe52d-42d7-ba4f-95f7-33effcf65713
60 lines
1.5 KiB
PHP
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"> </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(); ?>
|