2 articles cada um puxando uma categoria
-
Olá pessoal, estou com um problema de não saber como fazer essa questão.
COMO FAÇO PARA COLOCAR UM OUTRO ARTICLE EM BAIXO PEGANDO OUTRO QUERY POST DE CATEGORIA E POST PER PAGE?No meu site vai ter que aparecer dois Articles onde o primeiro aparece apenas 3 Post da categoria EVENTOS e logo em baixo de um botão aparecer outro article com 3 Posts da categoria DEPO.
ORIGINAL
<?php query_posts( array ( "category_name" => "eventos", "posts_per_page" => 3 )); $cont_banner = 1; if (have_posts()) : while (have_posts()) : the_post(); if ($cont_banner >= 4){ $cont_banner = 1; } ?> <article id="post-<?php the_ID(); ?>" class="banner<?=$cont_banner;?>" role="article"> <?php $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'single-post-thumbnail' ); ?> <a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"> <div class="box-index" style=" background-image:url(<?php echo $image[0];?>); "></div></a> <h1 class="titulo-index" ><b><a class="index-tro"href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></b></h1> <!--<?php if ( get_the_post_thumbnail( $post_id ) != '' ) { the_post_thumbnail(); } else { echo get_first_image(); } ?>--> </article> <?php <div id="bott"><a href="eventos.php"><p>+EVENTOS</p></a></div>
- O tópico ‘2 articles cada um puxando uma categoria’ está fechado para novas respostas.