Viewing File: /home/u103475381/domains/sinaprors.com.br/public_html/wp-content/themes/bones/page-beneficios.php

<?php
/*
 Template Name: BenefĂ­cios
*/
 ?>
 <?php get_header(); ?>

 <div id="content">

 	<div id="inner-content" class="wrap cf">

 		<main id="main" class="m-all t-all d-all cf" role="main">

 			<?php if (have_posts()) : while (have_posts()) : the_post(); ?>

 				<article id="post-<?php the_ID(); ?>" <?php post_class( 'cf' ); ?> role="article">

 					<header class="article-header">

 						<h1 class="page-title" itemprop="headline"><?php the_title(); ?></h1>

 						</header> <?php // end article header ?>

 						<section class="entry-content cf" itemprop="articleBody">

 							<?php the_content(); ?>

 							</section> <?php // end article section ?>

 							<section id="beneficios" class="animate start">
 								<div class="entry-content">
 									<?php
 									echo '<div class="boxes-beneficios fx fx-rw fx-center-top">';
 									$counter = 1;
 									$args = array(
 										'post_type' => 'beneficio',
 										'posts_per_page' => -1,
 										'order' => 'DESC'
 									);

 									$query = new WP_Query( $args );
 									while( $query->have_posts() ) :

 										$query->the_post();		
 										$url = wp_get_attachment_url( get_post_thumbnail_id($post->ID) );

 										echo '<div class="box-beneficio fx fx-rw fx-cl fx-center fadeInUp time-'.$counter.'"">';
 										echo '<a href="'.get_permalink().'" class="just-link">';
 										echo '<figure><img src="'.$url.'"></figure>';
 										echo '<h2>'.get_the_title().'</h2>';
 										echo '<p>'.get_field('descricao').'</p>';
 										echo '</a>';
 										echo '</div>';

 										$counter++;	

 									endwhile;
 									echo '</div>';

 									?>
 								</div>
 							</section>

 						</article>

 					<?php endwhile; endif; ?>

 				</main>

 				<?php //get_sidebar(); ?>

 			</div>

 		</div>

 		<?php get_footer(); ?>
Back to Directory File Manager