Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter sandrabordini

    (@sandrabordini)

    Tried the wp_reset_postdata(); and it didn’t work
    will try the Debug

    Here`s the full code (there´s some static content, the loops are at the end):

    <?php get_header();
    
    /**
    *Template name: Home
    */
    
    ?>
    
    <div class="row destaque">
    <div class="small-12 large-12 columns linha-dourada"></div>
    <div class="row">
    <div class="small-12 large-3 columns newsletter"></div>
    <div class="small-12 large-6 columns destaque-0800"><div class="destaque-0800-interna"></div></div>
    		<div class="small-12 large-3 columns busca">
    			<?php get_search_form(); ?>
    
    		</div>
    	</div>
    </div>
    
    <div class="row slider">
    	<div class="small-12 large-12 columns">
    
    		<ul class="example-orbit" data-orbit>
    			<li>
    				<img src="../assets/img/examples/satelite-orbit.jpg" alt="slide 1" />
    				<div class="orbit-caption">
    				Caption One.
    				</div>
    			</li>
    			<li class="active">
    				<img src="../assets/img/examples/andromeda-orbit.jpg" alt="slide 2" />
    				<div class="orbit-caption">
    				Caption Two.
    				</div>
    			</li>
    			<li>
    				<img src="../assets/img/examples/launch-orbit.jpg" alt="slide 3" />
    				<div class="orbit-caption">
    				  Caption Three.
    				</div>
    			</li>
    		</ul>
    
    	</div>
    </div>
    
    <div class="row icones-servicos">
    
    			<div class="small-12 large-6 columns">
    				<div class="row"><!--teleconsultoria-->
    					<div class="small-12 large-12 columns titulo-teleconsultoria">TeleConsultoria</div><!--Parte dourada teleconsultoria-->
    						<div class="small-12 large-12 columns"><!--Serviços teleconsultoria-->
    							<div class="row teleconsultoria">
    								<div class="small-4 large-4 columns vermelho"><div class="zero-oitocentos"><a href="#"></a></div></div>
    								<div class="small-4 large-4 columns azul"><div class="regulasus"><a href="#"></a></div></div>
    								<div class="small-4 large-4 columns verde"><div class="plataforma"><a href="#"></a></div></div>
    							</div>
    						</div>
    
    				</div>
    			</div>
    
    			<div class="small-12 large-6 columns">
    				<div class="small-4 large-4 columns"><!--apoio-->
    					<div class="titulo-apoio">Apoio</div>
    					<div class="apoio">
    						<div class="azul-escuro"><div class="info"><a href="#"></a></div></div>
    						<div class="azul-especial"><div class="nucleos"><a href="#"></a></div></div>
    					</div>
    				</div>
    				<div class="small-4 large-4 columns"><!--telediagnóstico-->
    					<div class="titulo-telediagnostico">TeleDiagnóstico</div>
    					<div class="telediagnostico">
    						<div class="amarelo-escuro"><div class="estomatonet"><a href="#"></a></div></div>
    						<div class="amarelo-medio"><div class="dermatonet"><a href="#"></a></div></div>
    						<div class="amarelo-claro"><div class="respiranet"><a href="#"></a></div></div>
    					</div>
    				</div>
    				<div class="small-4 large-4 columns"><!--desenvolvimento-->
    					<div class="titulo-desenvolvimento">Desenvolvimento</div>
    					<div class="rosa"><div class="desenvolvimento"><a href="#"></a></div></div>
    				</div>
    			</div>
    
    </div>
    
    <div class="row">
    	<div class="small-12 large-9 columns" role="main">
    
    	<h1>Notícias</h1>
    
    	<?php do_action( 'foundationpress_before_content' ); ?>
    
    		<?php
    
    			$args = array(
    				'post_type' => 'noticias',
    				'posts_per_page' => 6
    
    			);
    
    			$noticias = new WP_Query ( $args );
    
    		?>
    
    				<div class="row">
    
    				<?php if ($noticias->have_posts() ) : while( $noticias->have_posts()) : $noticias->the_post(); ?>
    
    					<div class="small-12 large-4 columns">
    						<div class="panel noticia-home-item">
    							<div class="thumbtitle group">
    
    								<div class="thumbnail thumb-noticias-home">
    
    									<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_post_thumbnail('thumbnail'); ?></a>
    								</div>
    
    								<h5>
    
    								<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
    
    								<?php the_title(); ?>
    
    									</a>
    
    								</h5>
    
    								<p class="data">Publicado em <?php $data = DateTime::createFromFormat('Ymd',get_field('data'))
    										;
    									echo $data->format('d/m/y'); ?></p>
    
    								<div class="resumo"><?php the_excerpt(); ?> </div>
    								<div class="saiba-mais"><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">Saiba mais..</a></div>
    
    							</div><!--thumb title-->
    						</div><!--panel-->
    					</div><!--large-4-->
    
    				<?php endwhile; endif; ?>
    
    				<?php wp_reset_query(); ?>
    
    				</div><!--row-notícias-->
    
    	</div>
    
    	<h1>Vídeos Teleducação</h1>
    
    		<?php
    
    			$args = array(
    				'post_type' => 'videos',
    				'posts_per_page' => 2
    
    			);
    
    			$videos = new WP_Query ( $args );
    
    		?>
    
    				<div class="row">
    
    				<?php if ($videos->have_posts() ) : while( $videos->have_posts()) : $videos->the_post(); ?>
    
    			<div class="small-12 large-4 columns">
    						<div class="panel noticia-home-item">
    							<div class="thumbtitle group">
    
    								<div class="thumbnail thumb-noticias-home">
    
    									<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_post_thumbnail('thumbnail'); ?></a>
    								</div>
    
    								<h5>
    
    								<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
    
    								<?php the_title(); ?>
    
    									</a>
    
    								</h5>
    
    								<p class="data">Publicado em <?php $data = DateTime::createFromFormat('Ymd',get_field('data'))
    										;
    									echo $data->format('d/m/y'); ?></p>
    
    								<div class="resumo"><?php the_excerpt(); ?> </div>
    								<div class="saiba-mais"><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">Saiba mais..</a></div>
    
    							</div><!--thumb title-->
    						</div><!--panel-->
    					</div><!--large-4-->
    
    				<?php endwhile; endif; ?>
    
    				<?php wp_reset_query(); ?>
    
    				</div><!--row-notícias-->
    
    </div>
    
    	<?php do_action( 'foundationpress_after_content' ); ?>
    
    </div>
    
    <?php get_footer(); ?>

    thank you for your help!

Viewing 1 replies (of 1 total)