Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PC×
Skip to content
VGSources
Blog

How to Fix WordPress Categories Not Working: 404s, Empty Archives, Wrong Posts, and Uncategorized

A practical, layered troubleshooting guide for WordPress category archives, covering assignment, permalinks, server rewrites, caching, themes, plugins, templates, and the REST API.
Length10 min Posted Quest giverVGSources Team
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

WordPress categories are taxonomy archives, not ordinary pages. When a category appears broken, the cause is usually one of five layers: the post is unpublished or assigned elsewhere, rewrite rules are stale, a cache is serving an old response, a plugin or theme changes the query, or the editor’s REST API requests are failing. Work through those layers in that order, starting with reversible checks before editing server files or code.

First, identify what “not working” means

A category link can fail in several distinct ways. Matching the symptom to the layer prevents unnecessary changes to templates or server configuration.

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Symptom Likely layer Safest first action What to test next
The link is missing from a menu or block Navigation, slug, or empty-term settings Open Posts > Categories and confirm the term and its post count Edit the menu or block so it targets the category archive
The category URL returns 404 Permalinks, rewrite rules, or a server conflict Save Settings > Permalinks without changing the structure Check rewrite support, conflicting slugs, and host configuration
The archive loads but shows no posts Assignment, publication status, cache, or a custom query Verify one affected post is published and assigned to that category Purge caches and inspect the category and post through the REST API
Posts from the wrong category appear Theme, page-builder, or plugin query filters Test with a default theme and plugins temporarily disabled Inspect the archive template and re-enable components one at a time
Category controls or the editor fail REST API, JavaScript, security, or performance settings Inspect browser console and network errors Check the API response while keeping the REST API enabled
Posts keep returning to Uncategorized Default category, autosave, editor, or plugin conflict Check the selected category and Settings > Writing Save the post again and isolate plugins if the choice does not persist

How category archives actually work

A category URL is a taxonomy archive. WordPress resolves the category’s slug, runs a query for posts assigned to that term, and chooses a template from the active theme. A category-specific template may be used when the theme provides one; otherwise WordPress falls back through its archive templates. In a classic theme this commonly means a category archive template, then a general archive template, and finally the main index. In a block theme, the equivalent layout is assembled from site-editor templates and query blocks.

That distinction explains two common mistakes. Creating a static Page named “News” does not repair a broken category archive, and changing a page’s content will not change the taxonomy query. Conversely, a category can contain valid posts while its archive looks wrong because a page builder or custom template replaces the normal query.

WordPress documentation describes permalinks as the permanent URLs of posts, pages, categories, and other archive pages. A category therefore depends on both taxonomy data and the site’s URL-rewrite system.

Use this safe repair sequence

Take a verified backup through your host or a backup tool before editing files, changing production plugins, or switching themes. The sequence below moves from low-risk checks to changes that can affect the whole site.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Record the taxonomy. Go to Posts > Categories. Note the category name, slug, parent, and post count. Check for a similarly named term with a different slug or parent.
  2. Verify one post. Open an affected post, confirm its status is Published, select the intended category, click Update, and open the category URL in a private browser window.
  3. Purge caches. Clear the browser cache and any page cache, object cache, reverse proxy, or CDN cache. Test while logged out; administrators can see uncached or bypassed responses that visitors do not.
  4. Flush rewrite rules. Go to Settings > Permalinks and click Save Changes without changing the permalink structure. This makes WordPress regenerate its rewrite rules.
  5. Test the default structure briefly. If the archive is still a 404, temporarily select the default plain permalink structure, save, and test the category. Restore the preferred structure afterward. If the plain structure works, the problem is in rewrite handling rather than the category record.
  6. Isolate extensions. Deactivate plugins one at a time, testing the archive after each change. Then switch temporarily to a current default theme. Re-enable components individually after identifying the conflict.
  7. Check debug output only when needed. For a critical error, enable WordPress debug logging and review wp-content/debug.log. Do not display debug output to visitors on a live site; turn public debugging off after collecting the information.

Fix a category URL that returns 404

Flush WordPress permalinks first

A 404 often means WordPress has not regenerated rewrite rules after a slug, permalink, migration, or plugin change. Saving Settings > Permalinks is the standard, reversible flush. Do not alter the structure merely to force a save unless you are testing it as described above.

Check the slug, parent, and collisions

In Posts > Categories, confirm that the URL uses the current slug, not the display name. A child category may include its parent in the URL depending on the site’s configuration. Look for a Page, custom post type, or other route using the same slug. A collision can make WordPress resolve the wrong object or return a 404.

Inspect Apache or Nginx rewrite support

On Apache, WordPress needs a writable, valid .htaccess file and the mod_rewrite module. WordPress defines mod_rewrite as “an extension module for Apache that allows for the rewriting of URLs on-the-fly.” If saving permalinks does not restore the archive, compare the site’s rules with the standard rules generated for its installation and ask the host to confirm that overrides are permitted.

Nginx does not use .htaccess. Its server block must pass unknown paths to WordPress’s front controller, normally index.php. Ask the host to verify the equivalent Nginx configuration rather than uploading Apache rules to an Nginx server. On managed or multisite installations, network-level rewrite rules and domain mappings can add another layer.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Separate a server 404 from a WordPress 404

View the response while logged out and compare a known working post URL with the category URL. If the server returns its own error page before WordPress loads, focus on virtual-host and rewrite configuration. If WordPress renders its normal 404 template, inspect the category slug, collisions, and rewrite rules inside WordPress.

Fix an archive that loads but is empty

Confirm publication and assignment

Open the post and check all of the following:

  • Status is Published, not Draft, Pending Review, Private, or Scheduled.
  • The intended category is checked in the post editor.
  • The post is not using a custom post type that the category archive does not query.
  • The category’s post count in Posts > Categories reflects at least one published post.

Deleting a category does not delete its posts; WordPress moves those posts to the site’s default category. Pages are not normal category posts and are assigned “Uncategorized” by default, so adding a Page to a category archive is not a reliable test.

Check the REST API record

Use the endpoint below while logged out, replacing your-slug with the actual slug:

/wp-json/wp/v2/categories?slug=your-slug

The response should identify the term and include its count. A missing or empty response indicates a slug or visibility problem; a record with a nonzero count points toward caching, query filtering, or template behavior. To investigate posts, query the posts endpoint with the category’s numeric ID, for example:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
/wp-json/wp/v2/posts?categories=123&status=publish

The exact ID comes from the category response. The API also supports filters such as parent and hide_empty, which help distinguish a genuinely empty term from one being hidden by a request parameter.

Rule out stale responses

Purge every cache layer, then test in a private window or with a cache-busting query string used only for diagnosis. A cached empty archive can survive after the post is correctly assigned. If the API shows the post but the page does not, the front-end query or cache is more likely than the taxonomy record.

Fix the wrong posts or wrong archive layout

Inspect theme and block templates

A theme can provide a category-specific template or a general archive template. In a block theme, open the Site Editor’s Templates area and inspect the category/archive template and its Query Loop block. Confirm that the block is set to inherit the main query rather than run a custom query that ignores the current category.

In a classic theme, look for custom archive files and query modifications. A template that calls a second query without resetting or respecting the main query can show every post, a fixed category, or no posts. Do not edit a parent theme directly; use a child theme or a controlled deployment so updates do not erase the change.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Check page builders and plugin filters

Archive modules, SEO filters, membership rules, multilingual tools, and custom query plugins can alter which posts are eligible. Deactivate plugins one at a time, checking the same category URL after each change. If the wrong-post problem disappears, re-enable the plugins individually to identify the conflicting setting or extension.

Test a default theme

Switch temporarily to an unmodified default theme. If the category works, the taxonomy and rewrite system are probably intact and the active theme’s archive template is the fault line. Keep the test brief, warn logged-in editors, and restore the production theme after recording the result.

Fix missing category links in menus, widgets, and blocks

Open the navigation menu or block and verify that it links to the category archive, not to a similarly named Page. In classic menus, use Appearance > Menus and the Categories panel; in block themes, edit the Navigation block and select the existing category. If the term is absent from a picker, confirm its slug and whether it has published posts. Some interfaces hide empty categories by design.

After changing a slug, remove the old menu item and add the category again so the link uses the current URL. Purge navigation or full-page caches if visitors still receive the old destination.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Stop posts from reverting to Uncategorized

Set the intended default

Go to Settings > Writing and review Default Post Category. This setting applies when an editor does not choose another category; it does not replace an explicit selection. Change it only after confirming the desired term exists.

Save and verify the post editor

In the editor, select the category, click Update, reload the post, and confirm the selection remains. If it vanishes before saving, inspect browser-console and network errors. If it saves and then changes later, check autosaves, scheduled publishing, editorial plugins, and integrations that update posts through the API.

Remember the Page exception

Pages use the Uncategorized term by default in WordPress’s data model, but they are not ordinary posts in the category archive. A Page appearing in a category-related screen does not prove the category query is functioning.

When category controls or the editor fail

Open the browser’s developer tools and watch the Console and Network panels while loading the editor or saving a category. Look for failed requests to /wp-json/, authentication errors, blocked JavaScript, or responses with a server error. Security and performance plugins can block or cache REST requests, and a web application firewall may reject legitimate editor traffic.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Keep the REST API enabled while diagnosing. WordPress’s developer documentation warns that disabling it breaks administration functionality that depends on the API. Restrict access with properly configured authentication or firewall rules if necessary, but do not use a blanket REST shutdown as a category fix.

Check the response body and HTTP status, not just the visual editor message. A 401 or 403 suggests authentication or permissions; a 404 can indicate a rewrite or route problem; a 500 points toward PHP, plugin, or server errors. Correlate the timestamp with wp-content/debug.log and the server’s error log.

Advanced checks for persistent failures

Compare the main query with a direct API query

If the category exists, has a count, and returns posts from the API but remains empty in the browser, compare the front-end request with the API result. A custom query may be excluding the post by post type, status, author, language, membership, or date. Remove one filter at a time rather than replacing the entire archive.

Check multisite and domain mappings

On multisite, confirm that the category belongs to the site whose URL you are testing. Network plugins can impose rewrite rules or domain mappings that differ between subsites. Flush permalinks on the affected site and ask the network administrator to verify the network configuration before editing shared files.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Review recent changes

Correlate the first failure with a slug change, migration, permalink change, theme update, plugin installation, PHP upgrade, or cache deployment. Roll back one change in a staging copy when possible. A controlled rollback is safer than simultaneously changing the theme, plugins, server rules, and database.

What not to do

  • Do not create a Page with the same name and assume it replaces the category archive.
  • Do not delete and recreate a category before recording its slug and assignments; that can create redirects, orphaned links, and a new term ID.
  • Do not disable the REST API as a generic security or category repair.
  • Do not edit .htaccess or Nginx configuration without a backup and a way to restore service.
  • Do not leave all plugins disabled after testing; re-enable them individually so the conflict can be identified.
  • Do not publish debug.log contents or enable visible debug output on a live site.

Verification checklist

Before declaring the problem fixed, test as an ordinary visitor in a private window:

  • The menu or block points to the current category slug.
  • The category URL returns a 200 response and the intended archive layout.
  • At least one published post assigned to the category appears.
  • Posts from unrelated categories do not appear.
  • The archive works after caches are purged and then rebuilt.
  • The editor can assign, save, and reload the category without console or REST errors.
  • A second category and a known post URL still work, proving the fix did not damage global rewrites.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More quests from Patch Notes

  1. How to Set Up a RedM (RDR2) Server in 2026: License Key, txAdmin and server.cfg, Step by StepBlog11min
  2. Best RedM (RDR2) Server Hosting in 2026: Comparing Four Hosts on Slots, Memory and PriceBlog10min
  3. How to Host a Mindustry Server in 2026: server-release.jar, Port 6567 and the Commands That MatterBlog7min
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.