PageRenderTime 22ms CodeModel.GetById 1ms RepoModel.GetById 0ms app.codeStats 0ms

/page-portfolio.php

https://gitlab.com/sebastianromero/Portfolio-2015
PHP | 51 lines | 41 code | 5 blank | 5 comment | 3 complexity | fbebf7e9938565f5dbf0d8f153d158cb MD5 | raw file
  1. <?php get_header(); ?>
  2. <div id="primary" class="contenido contenedor">
  3. <main id="main" class="contenido-principal" role="main">
  4. <div class="categorias">
  5. <?php nav_categorias(); ?>
  6. </div>
  7. <section class="portfolio">
  8. <ul class="grilla-portfolio">
  9. <?php
  10. // WP_Query arguments
  11. $args = array (
  12. 'posts_per_page' => '-1',
  13. 'ignore_sticky_posts' => 'true',
  14. 'post_status' => 'publish',
  15. 'has_password' => false
  16. );
  17. // The Query
  18. $proyectos = new WP_Query( $args );
  19. // The Loop
  20. if ( $proyectos->have_posts() ) {
  21. while ( $proyectos->have_posts() ) {
  22. $proyectos->the_post();
  23. ?>
  24. <li class="grilla-portfolio__proyecto">
  25. <article class="proyecto">
  26. <a href="<?php the_permalink(); ?>" class="pseudo-link"></a>
  27. <div class="proyecto__imagen" style="background-image:url('<?php miniatura('large'); ?>');"></div>
  28. <div class="proyecto__datos">
  29. <h1><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
  30. </div>
  31. </article>
  32. </li>
  33. <?php
  34. }
  35. } else {
  36. // no posts found
  37. }
  38. // Restore original Post Data
  39. wp_reset_postdata();
  40. ;?>
  41. </ul>
  42. </section>
  43. </main>
  44. <!-- #main -->
  45. </div>
  46. <?php get_footer(); ?>