Ejemplo n.º 1
0
/**
 * Show filtered posts of post type "Archivo"
 * @param string $filters
 */
function show_filtered_projects($filters)
{
    global $post;
    $ano = isset($filters['ano']) ? $filters['ano'] : '';
    $arquitecto_despacho = isset($filters['arquitecto-despacho']) ? $filters['arquitecto-despacho'] : '';
    $lugar = isset($filters['lugar']) ? $filters['lugar'] : '';
    $tipologia = isset($filters['tipologia']) ? $filters['tipologia'] : '';
    $proyecto = isset($filters['proyectos']) ? $filters['proyectos'] : '';
    if ('' !== $proyecto) {
        $args = array('name' => $proyecto, 'post_type' => 'archivo');
    } else {
        $args = get_archive_filter_args($ano, $arquitecto_despacho, $lugar, $tipologia);
    }
    $query = new WP_Query($args);
    while ($query->have_posts()) {
        $query->the_post();
        $autor = get_autor_proyecto($post->ID);
        $permalink = get_permalink($post->ID);
        $image = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'single-post-thumbnail');
        get_html_project($permalink, $image[0], get_the_title(), $autor);
    }
    wp_reset_query();
}
Ejemplo n.º 2
0
<?php

get_header();
the_post();
$hero_full = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full');
$hero_url = $hero_full[0];
$lugar = get_lugar_proyecto($post->ID);
$autor = get_autor_proyecto($post->ID);
$ano = get_ano_proyecto($post->ID);
?>

<section class="[ single ]">

	<!-- =================================================
	==== HERO
	================================================== -->
	<article class="[ hero hero-single-archivo ][ margin-bottom ]" style="background-image: url(<?php 
echo $hero_url;
?>
)">
		<div class="[ opacity-gradient--bottom-top ][ z-index-2 ]"></div>
		<div class="wrapper">
			<div class="[ text-left ][ center-top ][ z-index-2 ][ xmall-12 ]">
				<button class="[ button--light button--ink ][ no-padding ]" onclick="window.history.go(-1); return false;"">< atrás</button>
			</div>
			<div class="[ center-full ][ z-index-3 ][ xmall-12 ][ text-center color-light ]">
				<div class="[ wrapper ]">
					<h1 class="[  ][ no-margin ]"><?php 
echo get_the_title();
?>
</h1>