FIXED
remove from the top of file category.php the previous code and insert the following in the function.php:
`
<?php
function my_post_queries( $query ) {
// do not alter the query on wp-admin pages and only alter it if it’s the main query
if (!is_admin() && $query->is_main_query()){
// alter the query for the home and category pages
if(is_home()){
$query->set(‘posts_per_page’, 3);
}
if(is_category()){
$query->set(‘posts_per_page’, 3);
}
}
}
add_action( ‘pre_get_posts’, ‘my_post_queries’ );
?>