asiergogortza_theme/template-portada.php

58 lines
1.7 KiB
PHP
Raw Normal View History

2017-01-27 23:17:33 +01:00
<?php
/**
* Template Name: Portada Asier Gogortza
*
*/
?>
<?php get_header(); ?>
<!-- header -->
<div class="row">
<div class="col-xs-12 col-sm-6 col-md-3">
<div class="sidebar-right1 span2">
<div class="head">
<?php if ( function_exists( 'jetpack_the_site_logo' ) ) jetpack_the_site_logo(); ?>
<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php bloginfo( 'name' ); ?></a></h1>
<h4 class="site-description"><?php bloginfo( 'description' ); ?></h4>
</div>
<?php dynamic_sidebar( 'sidebar-left' ); ?>
</div>
</div>
<div class="col-xs-12 col-sm-6 col-md-7">
<!-- get projets -->
<div class="row projects">
<?php
$projects = get_posts(array('category'=> '10', 'nopaging' => 'true','orderby'=>'date','order'=>'DESC' ));
foreach ($projects as $p) :
$id = $p->ID; ?>
<div class="col-md-4" style="padding:10px;">
<a href="<?php echo get_the_permalink($id); ?>"><div class="thumb" style="background-image:url('<?php echo get_the_post_thumbnail_url($id,'medium'); ?>'); background-size:cover;width:100%; padding-bottom:100%; background-position: center center;"><?php //echo get_the_title($id); ?></div></a>
</div>
<?php
endforeach;
?>
</div>
<!-- end projects -->
<!--content-->
<div class="row">
<div class="content" style="min-height:0;">
<?php if(have_posts()) : ?>
<?php while(have_posts()) : the_post(); ?>
<div class="post-main">
<div class="post">
<?php the_content(); ?>
<?php wp_link_pages( $args ); ?>
</div>
</div>
<?php endwhile; ?>
<?php endif; ?>
</div>
</div>
</div>
</div>
<?php get_footer(); ?>