archive-services.php 984 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. get_header();
  3. taskereasy_blog_banner();
  4. ?>
  5. <section class="section-padding">
  6. <div class="container">
  7. <?php if(have_posts()) {
  8. $count = 0;
  9. while(have_posts()){
  10. the_post();
  11. $align = ($count%2 == 0) ? 'align-right' : ''; ?>
  12. <div class="services-container <?php echo esc_attr($align); ?>">
  13. <?php if(has_post_thumbnail()){ ?>
  14. <div class="services-image">
  15. <div class="services-no"><?php echo esc_html($count); ?></div>
  16. <a href="<?php the_permalink(); ?>"><?php the_post_thumbnail(); ?></a>
  17. </div>
  18. <?php } ?>
  19. <div class="services-info">
  20. <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
  21. <p><?php echo taskereasy_custom_excerpt_length(50); ?></p>
  22. <a href="<?php the_permalink(); ?>" class="btn"><?php echo esc_html__('Start Now', 'taskereasy'); ?> <i class="fa fa-angle-right"></i></a>
  23. </div>
  24. </div>
  25. <?php $count++;
  26. }
  27. } ?>
  28. </div>
  29. </section>
  30. <?php
  31. get_footer();
  32. ?>