If the number of posts in the admin panel is more than $query->set(‘posts_per_page’, ‘number of posts’);, in the place of output of posts 404 error may appear
Paste the code into your function.php file and don’t forget to change the number of entries in line $query->set(‘posts_per_page’, 3);
<?php function posts_per_page($query) { if(!is_admin()) { if(is_post_type_archive('post')) { $query->set('posts_per_page', 3); } } } add_action('pre_get_posts', 'posts_per_page'); ?>