Hi
I have place this code “query_posts( ‘cat=-293’ );” in /generatepress_child/index.php to exclude just one category, it’s work but i have the last four same posts indefinitely in my home and I don’t find the solution, have you an idea ?
Thank you 🙂
<?php
/**
* generate_before_main_content hook.
*
* @since 0.1
*/
do_action( 'generate_before_main_content' );
if ( have_posts() ) :
/* On n'affiche pas la catégorie "Salons de coiffure" N°293 en accueil du blog */
query_posts( 'cat=-293' );
while ( have_posts() ) : the_post();
/* 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() );
endwhile;
generate_content_nav( 'nav-below' );
else :
get_template_part( 'no-results', 'index' );
endif;
/**
* generate_after_main_content hook.
*
* @since 0.1
*/
do_action( 'generate_after_main_content' );
?>