Skip to content
  • Home
  • About
  • No Access
  • Privacy Policy
Bits of .NET
Bits of .NET
  • Asp.Net Core
  • C#
  • SQL
  • JavaScript
  • CSS
  • About
  • ErcanOPAK.com
  • No Access
  • Privacy Policy

Bits of .NET

Daily micro-tips for C#, SQL, performance, and scalable backend engineering.

  • Asp.Net Core
  • C#
  • SQL
  • JavaScript
  • CSS
  • About
  • ErcanOPAK.com
  • No Access
  • Privacy Policy
Wordpress

WordPress: Recover a Navigation Menu That Vanishes After Switching Themes

- 26.09.26 - ErcanOPAK

📝 The Menu That Disappeared the Moment You Changed Themes

A carefully built navigation menu can simply vanish from the site the instant a new theme is activated – not because the menu itself was deleted, but because WordPress menus are assigned to specific “theme locations,” and those location names are defined by each theme individually, so a menu assigned to the old theme’s “primary” location has nowhere to appear under a new theme that defines its locations differently.

🔎 The Problem

Appearance > Menus still shows the menu, fully intact, with every page and link exactly as it was built – but Appearance > Customize > Menus, or the site itself, shows no menu assigned to any visible location, because the new theme’s `register_nav_menus()` call defines a different set of location names than the previous theme did.

✅ Fix: Reassign the Menu to the New Theme’s Locations

  • Appearance > Menus > Manage Locations tab lists every navigation location the CURRENT theme defines, alongside a dropdown to assign an existing menu to each one – this is usually a two-minute fix once you’re looking at the right screen, since the menu itself was never actually lost.
  • If the new theme defines menu locations with unfamiliar names (a theme using ‘header-menu’ where the old one used ‘primary’, for instance), reading the new theme’s documentation for its specific location names avoids guessing which one corresponds to where the main navigation actually displays.
  • For a theme that defines NO menu locations at all (rare, but happens with minimal or block-based themes), the menu needs to be added as a Navigation block directly in the site editor or a template part instead of through the classic Locations screen.

⚠️ Why This Catches People Off Guard

  • Nothing about switching themes produces an error or a warning here – from WordPress’s point of view, everything worked exactly as designed, since a menu location is deliberately theme-specific and switching themes is expected to potentially need re-mapping.
  • This is worth checking immediately after any theme switch, before assuming a missing menu means something was deleted or corrupted – the Manage Locations tab is almost always where the actual explanation and the fix are both waiting.

A theme switch doesn’t delete a menu – it just stops recognizing where the old theme used to hang it, and the new theme has its own hooks waiting to be told what to hang there instead.

— WordPress Admin

Related posts:

WordPress: Fix a Scheduled Post That Publishes Hours Late Because of Server Time Zone Drift

WordPress: Fix a Scheduled Post That Publishes Hours Late Because of Server Time Zone Drift

WordPress: Advanced Cache Strategies for High Performance

WordPress: Advanced Cache Strategies for High Performance

How to solve WordPress Briefly unavailable for scheduled maintenance. problem

How to solve WordPress "Briefly unavailable for scheduled maintenance." problem

Views: 5

Post navigation

C#: Why an Extension Method Gets Silently Ignored When a Real Method Has the Same Signature
CSS: Fix a Transition That Refuses to Animate the First Time an Element Appears on the Page

Leave a Reply Cancel reply

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

November 2026
M T W T F S S
 1
2345678
9101112131415
16171819202122
23242526272829
30  
« Oct    

Most Viewed Posts

  • How to make theater mode the default for Youtube (1,055)
  • Get the User Name and Domain Name from an Email Address in SQL (981)
  • How to add default value for Entity Framework migrations for DateTime and Bool (977)
  • Get the First and Last Word from a String or Sentence in SQL (858)
  • How to select distinct rows in a datatable in C# (854)
  • How to enable, disable and check if Service Broker is enabled on a database in SQL Server (653)
  • Add Constraint to SQL Table to ensure email contains @ (609)
  • Average of all values in a column that are not zero in SQL (570)
  • How to use Map Mode for Vertical Scroll Mode in Visual Studio (547)
  • Find numbers with more than two decimal places in SQL (475)

Recent Posts

  • C#: Fix a ConditionalWeakTable Entry Vanishing Too Soon
  • Docker: Fix a Stale COPY Layer After Editing .dockerignore
  • Photoshop: Fix a Pattern Overlay Scaling Wrong on a High-DPI File
  • SQL Server: Fix a Computed Column Index Skipped by Implicit Cast
  • HTML5: Fix a required Input Inside a Hidden Tab Blocking Submit
  • SQL Server: Fix ROW_NUMBER Ties Reordering Between Identical Runs
  • C#: Fix an Enum HasFlag Returning True for the Zero Value
  • WordPress: Fix Featured Images Vanishing After a CDN Migration
  • Photoshop: Fix Content-Aware Fill Smearing a Repeating Pattern
  • Asp.Net Core: Fix Antiforgery Tokens Rejected Behind a Reverse Proxy

Most Viewed Posts

  • How to make theater mode the default for Youtube (1,055)
  • Get the User Name and Domain Name from an Email Address in SQL (981)
  • How to add default value for Entity Framework migrations for DateTime and Bool (977)
  • Get the First and Last Word from a String or Sentence in SQL (858)
  • How to select distinct rows in a datatable in C# (854)

Recent Posts

  • C#: Fix a ConditionalWeakTable Entry Vanishing Too Soon
  • Docker: Fix a Stale COPY Layer After Editing .dockerignore
  • Photoshop: Fix a Pattern Overlay Scaling Wrong on a High-DPI File
  • SQL Server: Fix a Computed Column Index Skipped by Implicit Cast
  • HTML5: Fix a required Input Inside a Hidden Tab Blocking Submit

Social

  • ErcanOPAK.com
  • GoodReads
  • LetterBoxD
  • Linkedin
  • The Blog
  • Twitter
© 2026 Bits of .NET | Built with Xblog Plus free WordPress theme by wpthemespace.com