List only posts from specific category on category page
You are complicating everything with a custom query. You should never ever replace the main query with a custom one on the home page or any type of archive page, this breaks page functionalities as you have seen. You should take your time and read this post I have done on this particular issue You … Read more