page-art.php 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <?php get_header(); ?>
  2. <div id="gallery-wrap" class="container-fluid overflow-hidden art-gallery">
  3. <div class="dw-carousel leader pb-5">
  4. <div class="dw-carousel-track mt-5" tabindex="0" role="region" aria-roledescription="carousel" aria-label="Painting gallery">
  5. <div class="dw-carousel-slide">
  6. <img class="art-image" src="<?php echo get_template_directory_uri(); ?>/img/lemon-mater.jpg" alt="<?php the_title(); ?>"/>
  7. </div>
  8. <?php query_posts('category_name=paintings&showposts=12'); ?>
  9. <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
  10. <div class="dw-carousel-slide">
  11. <?php $img_url = wp_get_attachment_image_src(get_post_thumbnail_id(),'full'); ?>
  12. <img class="art-image img-fluid" src="<?php echo $img_url[0];?>" alt="<?php the_title(); ?>"/>
  13. </div>
  14. <?php endwhile; ?>
  15. </div>
  16. <button class="dw-carousel-prev" type="button" aria-label="Previous painting">&lsaquo;</button>
  17. <button class="dw-carousel-next" type="button" aria-label="Next painting">&rsaquo;</button>
  18. </div>
  19. </div>
  20. <div class="container">
  21. <div class="row my-5">
  22. <h3><em>Art Projects</em></h3>
  23. </div>
  24. <div class="row">
  25. <div class="col-lg-3">
  26. <h4><a href="#figures">Figures</a></h4>
  27. <h4><a href="#landscapes">Landscapes</a></h4>
  28. <h4><a href="#still">Still Life</a></h4>
  29. <h4><a href="#abstract">Abstract</a></h4>
  30. </div>
  31. <div class="col-lg-9">
  32. <div class="row art-gallery py-3">
  33. <?php $i = 0; $query = new WP_Query(array('category_name' => 'paintings', 'posts_per_page' => -1)); while ( $query->have_posts() ) : $query->the_post(); ?>
  34. <div class="col-lg-4">
  35. <div class="studio-thumbnail">
  36. <?php
  37. if (has_post_thumbnail()) {
  38. $img_url = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full');
  39. } else {
  40. $img_url = get_post_meta( get_the_ID(), 'featured_image_url');
  41. }
  42. ?>
  43. <a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( '%s', 'daw' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><img class="studio-thumb" src="<?php echo $img_url[0];?>" width="100%" alt="<?php the_title(); ?>"/></a>
  44. </div>
  45. <article class="studio">
  46. <div class="entry-content">
  47. <h4><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( '%s', 'daw' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h4>
  48. <?php dw_good_excerpt(110); ?>
  49. </div>
  50. </article>
  51. </div>
  52. <?php if((++$i % 3) == 0): ?>
  53. </div>
  54. <div class="row art-gallery">
  55. <?php endif; ?>
  56. <?php endwhile; $i++;?>
  57. </div>
  58. </div>
  59. </div>
  60. </div>
  61. </div>
  62. <?php get_footer(); ?>