Carregando paginas e posts
Ando tendo uma dificuldade um tanto estranha aqui pessoal!
Bom é o seguinte eu adaptei um banner jQuery para mostrar imagens de "campos destacados" e "link" de paginas especificas atravez de "query_post" na home, até ai tudo bem o banner roda na home e demais paginas perfeitamente puxando via loop as imagens e textos mas quando adiciono um loop de um post de uma determinada categoria simplesmente ele não carrega o post, mas se eu excluir do codigo os loops das paginas esse loop do post funciona!!!!!!!!!
Ou seja meu problema é que eu queria carregar atravez de "query_post" paginas e posts e no momento só está carregando um ou outro ou seja parece que está avendo um conflito ai por que quando o query_post carrega as pages ele não carrega os pots algo assim...
OBS. Esse banner alem de carregar imagem tambem carrega um caption com link e informação sobre a pagina ou post por isso tem uma "DIV image_reel" e outra "DIV linkoverlay"!
Segue codigo para analise:
<div class="image_reel">
<?php query_posts('showposts=1&page_id=9');?>
<?php if (have_posts()): while (have_posts()) : the_post();?>
<a href="<?php the_permalink();?>" alt="<?php the_title();?>"><img src="<?php echo get_option('home');?>/<?php $key="banner-index";echo get_post_meta($post->ID,$key,true);?>" title="<?php the_title();?>" alt="<?php the_title();?>" width="798px" height="237px"/></a>
<?php endwhile; else:?>
<?php endif;?>
<?php query_posts('showposts=1&page_id=15');?>
<?php if (have_posts()): while (have_posts()) : the_post();?>
<a href="<?php the_permalink();?>" alt="<?php the_title();?>"><img src="<?php echo get_option('home');?>/<?php $key="banner-index";echo get_post_meta($post->ID,$key,true);?>" title="<?php the_title();?>" alt="<?php the_title();?>" width="798px" height="237px"/></a>
<?php endwhile; else:?>
<?php endif;?>
<?php query_posts('showposts=1&name=producao');?>
<?php if (have_posts()): while (have_posts()) : the_post();?>
<a href="<?php the_permalink();?>" alt="<?php the_title();?>"><img src="<?php echo get_option('home');?>/<?php $key="banner-index";echo get_post_meta($post->ID,$key,true);?>" title="<?php the_title();?>" alt="<?php the_title();?>" width="798px" height="237px"/></a>
<?php endwhile; else:?>
<?php endif;?>
</div>
<div class="linkoverlay">
<?php query_posts('showposts=1&page_id=9');?>
<?php if (have_posts()): while (have_posts()) : the_post();?>
<span class="link"><a href="<?php the_permalink();?>" alt="<?php the_title();?>"><?php the_title()?></a><br />Com sistema de administração interna eficiente e eficaz.</span>
<?php endwhile; else:?>
<?php endif;?>
<?php query_posts('showposts=1&page_id=15');?>
<?php if (have_posts()): while (have_posts()) : the_post();?>
<span class="link"><a href="<?php the_permalink();?>" alt="<?php the_title();?>"><?php the_title()?></a><br />Uma solução perfeita pra quem não necessita de atualizações diárias.</span>
<?php endwhile; else:?>
<?php endif;?>
<?php query_posts('showposts=1&name=producao');?>
<?php if (have_posts()): while (have_posts()) : the_post();?>
<span class="link"><a href="<?php the_permalink();?>" alt="<?php the_title();?>"><?php the_title()?></a><br />Serviços diversos.</span>
<?php endwhile; else:?>
<?php endif;?>
</div>
</div>
Fico no aguardo pessoal! :mellow:
Discussão (3)
Carregando comentários...