<?php /** * The section containing preview of posts from category * depending on the call from section-featured.php or whatever * other template calling this file * * @package arcHIVE-theme * @since arcHIVE-theme 1.0.0 */ ?> <?php $the_query = new WP_Query( array( 'post_type' => 'ofisuport-ajut', 'post_per_page' => '4' ) ); ?> <?php if ( $the_query->have_posts() ) : ?> <?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?> <article class=""> <h3 class="entry-title"> <a href="<?php the_permalink(); ?>" rel="bookmark"> <?php the_title(); ?> </a> </h3> <section class="excerpt post-excerpt"> <a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>"> <?php the_excerpt() ?> </a> <ul> <li class="ofisuport-fund ofisuport-fund-target"> <?php the_field('os_fund_target'); ?> </li> <li class="ofisuport-fund ofisuport-fund-source"> <?php the_field('os_fund_source'); ?> </li> <li class="ofisuport-fund ofisuport-fund-field"> <?php the_field('os_fund_field'); ?> </li> <li class="ofisuport-fund ofisuport-funder-name"> <?php the_field('os_funder_name'); ?> </li> <li class="ofisuport-fund ofisuport-fund-apply-begin"> <?php the_field('os_fund_apply_begin'); ?> </li> <li class="ofisuport-fund ofisuport-fund-apply-end"> <?php the_field('os_fund_apply_end'); ?> </li> <li class="ofisuport-fund ofisuport-fund-call"> <?php the_field('os_fund_call'); ?> </li> <li class="ofisuport-fund ofisuport-fund-media"> <?php $media = get_field( 'os_fund_media' ); if( $media ): ?> <a href="<?php echo $media['url']; ?>" title="<?php echo $media['tile']; ?>"> <?php echo $media['filename']; ?> </a> <?php endif; ?> </li> </ul> </section> </article> <?php endwhile;//end of the loop ?> <?php wp_reset_postdata(); ?> <?php else : //if no post in query ?> <p class="no-content"><?php _e( 'Sorry, no posts matched your criteria.' ); ?></p> <?php endif; ?>