Categoria na pagina inicial
-
Oi pessoas, estou com um problema bem grande estou criando um site e na pagina inicial preciso que aparecesse somente os posts da categoria produtos e não os posts recentes, porque nesse site também tem uma pagina de noticias, o resultado é que na pagina inicial aparece as noticias e os produtos, alguém pode me ajudar por favor?
O codigo da pagina inicial ta assim:
<?php if ( have_posts() ) : ?> <?php /* Start the Loop */ ?> <?php while ( have_posts() ) : the_post(); ?> <?php /* Include the Post-Format-specific template for the content. * If you want to override this in a child theme, then include a file * called content-___.php (where ___ is the Post Format name) and that will be used instead. */ get_template_part( 'content', get_post_format() ); ?> <?php endwhile; ?> <?php if( $boxy['pagenavi'] && function_exists( 'boxy_pagination' ) ) : boxy_pagination(); else : boxy_posts_nav(); endif; ?>
Vi um topico aqui com o cara dizendo para fazer assim:
<?php if (is_home()) { query_posts(“category_name=produtos”); } ?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>Mas não funcionou aqui
Visualizando 1 resposta (de um total de 1)
Visualizando 1 resposta (de um total de 1)
- O tópico ‘Categoria na pagina inicial’ está fechado para novas respostas.