Categoria de post na Página Principal
-
Boa tarde pessoal,
Eu queria separar as exibições de post por categorias na minha pagina principal.
até consegui demonstrar duas barra de postagens, MAS as duas só aparecem os posts de uma mesma categorias. Coloquei indicando as duas categorias que eu queria que mostrasse.
Olhem no código abaixo:</div><!-- services-wrap--> <div class="clear"></div> </div><!-- container --> </section><div class="clear"></div> <section id="FrontBlogPost"> <div class="container"> <h2 class="section_title"><?php esc_attr_e('Latest Posts','skt-wedding-lite'); ?></h2> <div class="site-main"> <?php $p = 0; global $wp_query; query_posts(array_merge($wp_query->query, array( 'paged' => get_query_var('paged'), 'posts_per_page' => 5, 'orderby' => 'title', 'order' => 'DESC' ))); ?> <?php global $wp_query; ?> <?php if (is_home()) { query_posts("category_name=depoimentos"); } ?> <?php while( $wp_query->have_posts() ) : $wp_query->the_post(); ?><?php $p++; ?> <div class="blog_lists BlogPosts <?php if( $p%3==0 ){?>last_column<?php } ?>"> <a title="<?php the_title(); ?>" href="<?php the_permalink(); ?>"> <?php if( has_post_thumbnail() ) { ?> <?php the_post_thumbnail(); ?> <?php } else { ?> <img src="<?php echo get_template_directory_uri(); ?>/images/img_404.png" /> <?php } ?> </a> <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2> <div class="blog-meta"><?php echo get_the_date(); ?> | <?php comments_number(); ?></div> <?php echo wp_kses_post(sktweddinglite_content(27)); ?> <a class="MoreLink" href="<?php the_permalink(); ?>"><?php esc_attr_e('Continue lendo »','skt-wedding-lite');?></a> <div class="clear"></div> </div> <?php endwhile; ?> <?php //sktweddinglite_pagination(); ?> <div class="clear"></div> </div> <div class="clear"></div> </div><!-- .container --> </section><!-- #FrontBlogPost --> <section id="FrontBlogPost"> <div class="container"> <h2 class="section_title"><?php esc_attr_e('Latest Posts','skt-wedding-lite'); ?></h2> <div class="site-main"> <?php $p = 0; global $wp_query; query_posts(array_merge($wp_query->query, array( 'paged' => get_query_var('paged'), 'posts_per_page' => 5, 'orderby' => 'title', 'order' => 'DESC' ))); ?> <?php global $wp_query; ?> <?php if (is_home()) { query_posts("category_name=serviços"); } ?> <?php while( $wp_query->have_posts() ) : $wp_query->the_post(); ?><?php $p++; ?> <div class="blog_lists BlogPosts <?php if( $p%3==0 ){?>last_column<?php } ?>"> <a title="<?php the_title(); ?>" href="<?php the_permalink(); ?>"> <?php if( has_post_thumbnail() ) { ?> <?php the_post_thumbnail(); ?> <?php } else { ?> <img src="<?php echo get_template_directory_uri(); ?>/images/img_404.png" /> <?php } ?> </a> <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2> <div class="blog-meta"><?php echo get_the_date(); ?> | <?php comments_number(); ?></div> <?php echo wp_kses_post(sktweddinglite_content(27)); ?> <a class="MoreLink" href="<?php the_permalink(); ?>"><?php esc_attr_e('Continue lendo »','skt-wedding-lite');?></a> <div class="clear"></div> </div> <?php endwhile; ?> <?php //sktweddinglite_pagination(); ?> <div class="clear"></div> </div> <div class="clear"></div> </div><!-- .container --> </section><!-- #FrontBlogPost --> <?php endif; ?> <?php get_footer(); ?>
Indiquei a categoria depoimento, e depois a categoria serviços. Mas parece que a categoria depoimentos não fecha pra começar a de serviços.
Alguém pode me ajudar?
Visualizando 1 resposta (de um total de 1)
Visualizando 1 resposta (de um total de 1)
- O tópico ‘Categoria de post na Página Principal’ está fechado para novas respostas.