404 error on single portfolio pages

Table of Contents

Symptom

Projects or the Portfolio page return Page not found.

Cause

Rewrite rules went stale after a slug or a permalink change, or the project base collides with a page or a category that has the same slug.

Before 3.10.0, saving a Custom base in Settings → Permalinks could replace it with the site’s post name structure. Ordinary pages of the site then return 404 too.

Fix

  1. Open Settings → Permalinks and click Save Changes. This rebuilds the rewrite rules; you do not have to change anything on the screen.
  2. If the error stays, check that no page other than the Portfolio page uses the slug portfolio.
  3. Check that the category base in Settings → Permalinks differs from the project base.
  4. Deactivating and reactivating the plugin also flushes the rules.
  5. If ordinary pages return 404 too, update Visual Portfolio to 3.10.0 or newer. The first page load after the update sets the project structure to Portfolio base. If you used a Custom base, enter it again in Settings → Permalinks and click Save Changes.

On the Avada theme the cause is different; see Avada theme Portfolio post type conflict.

Was this page helpful?