Page Links become "404 File not Found" when Categories are Excluded from Home
-
Hi,
I moved my blog from discojing.com and hapatite.com. I only want to show new posts from hapatite.com on the home page while keeping all the old content for archives, indexes, and search.
When I exclude the category I applied to migrated posts, discojing.com, cat id 88, it makes the pages ~4 instead of 50+, which is good. But then when I click on any page other than 2, it’s “File not Found”.
This is when I exclude it in functions.php with
function exclude_category($query) { if ($query->is_home()) { $query->set('cat', '-88'); } return $query; } add_filter('pre_get_posts', 'exclude_category');
Or when I use Simple Exclude plugin. Is there any way to do a
if_category
,is_home
, don’t show argument? I’ve usedif_category
to add things, but not hide content.I heard this might be an issue with published posts and expected post numbers not matching up.
- The topic ‘Page Links become "404 File not Found" when Categories are Excluded from Home’ is closed to new replies.