page-art.php 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <?php get_header(); ?>
  2. <div id="gallery-wrap" class="container-fluid overflow-hidden art-gallery">
  3. <div id="gallery" class="carousel slide" data-bs-ride="carousel">
  4. <div class="leader pb-5">
  5. <div class="row mt-5">
  6. <div class="carousel-inner">
  7. <div class="carousel-item active gallery-image">
  8. <div class="d-flex justify-content-center">
  9. <img class="art-image" src="<?php echo get_template_directory_uri(); ?>/img/lemon-mater.jpg" alt="<?php the_title(); ?>"/>
  10. </div>
  11. </div>
  12. <?php query_posts('category_name=paintings&showposts=12'); ?>
  13. <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
  14. <div class="carousel-item gallery-image">
  15. <div class="d-flex justify-content-center">
  16. <?php $img_url = wp_get_attachment_image_src(get_post_thumbnail_id(),'full'); ?>
  17. <img class="art-image img-fluid" src="<?php echo $img_url[0];?>" alt="<?php the_title(); ?>"/>
  18. </div>
  19. </div>
  20. <?php endwhile; ?>
  21. </div>
  22. <button class="carousel-control-prev" type="button" data-bs-target="#gallery" data-bs-slide="prev">
  23. <span class="carousel-control-prev-icon" aria-hidden="true"></span>
  24. <span class="visually-hidden">Previous</span>
  25. </button>
  26. <button class="carousel-control-next" type="button" data-bs-target="#gallery" data-bs-slide="next">
  27. <span class="carousel-control-next-icon" aria-hidden="true"></span>
  28. <span class="visually-hidden">Next</span>
  29. </button>
  30. </div>
  31. </div>
  32. </div>
  33. </div>
  34. <div class="container">
  35. <div class="row my-5">
  36. <h3><em>Art Projects</em></h3>
  37. </div>
  38. <div class="row">
  39. <div class="col-lg-3">
  40. <h4><a href="#figures">Figures</a></h4>
  41. <h4><a href="#landscapes">Landscapes</a></h4>
  42. <h4><a href="#still">Still Life</a></h4>
  43. <h4><a href="#abstract">Abstract</a></h4>
  44. </div>
  45. <div class="col-lg-9">
  46. <div class="row art-gallery py-3">
  47. <?php $i = 0; $query = new WP_Query(array('category_name' => 'paintings', 'posts_per_page' => -1)); while ( $query->have_posts() ) : $query->the_post(); ?>
  48. <div class="col-lg-4">
  49. <div class="studio-thumbnail">
  50. <?php
  51. if (has_post_thumbnail()) {
  52. $img_url = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full');
  53. } else {
  54. $img_url = get_post_meta( get_the_ID(), 'featured_image_url');
  55. }
  56. ?>
  57. <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>
  58. </div>
  59. <article class="studio">
  60. <div class="entry-content">
  61. <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>
  62. <?php dw_good_excerpt(110); ?>
  63. </div>
  64. </article>
  65. </div>
  66. <?php if((++$i % 3) == 0): ?>
  67. </div>
  68. <div class="row art-gallery">
  69. <?php endif; ?>
  70. <?php endwhile; $i++;?>
  71. </div>
  72. </div>
  73. </div>
  74. </div>
  75. </div>
  76. <?php get_footer(); ?>