Your construction of your custom loop is a bit of a mess unfortuantely. I’m not going to go through this now, but I’ll add links for you to go and read through :-).
You should go and have a look on how to properly construct a custom query with WP_Query
. You should also have a read about using the next_posts_link
when using a custom query. The last point here, there are a few bugs in your code which you need to take a look at. You should set you debug to true in wp-config.php. Here is an article about Debugging WordPress
At this point in time, you are only creating a custom query to remove one post from the loop. Apart from that, you are running the main query in a custom loop.
Here is how I would tackle this problem.
Reset your page with the standard loop, the same loop you’ve used that said is working on category.php. Now, use pre_get_posts
to exclude your post from the main query. Here is the code. Add this in functions.php. This is modified from the codex.
function exclude_single_posts_home($query) {
if ($query->is_home() AND $query- >is_main_query()) {
$query->set('post__not_in', array(419));
}
}
add_action('pre_get_posts', 'exclude_single_posts_home');