没有不值得去解决的问题,也没有不值得去学习的技术!

Switching From Hueman to Twenty Twenty-Five and Configuring Multilingual Menus

作者:

在

A practical theme switching guide, backed by backups and centered on multilingual menu configuration.

1. Why Change the Theme?

My blog shuijingwanwq.com has been using the Hueman theme, a classic, stable, and feature-rich theme that has served me well for a long time. However, as my blog content grew and visitor devices changed, I gradually noticed some issues.

The most critical data comes from website analytics: over 35% of visitors have a screen width greater than 1680px. The Hueman theme’s support for ultra-wide screens is less than ideal; the maximum width of the content area is limited, resulting in large empty margins and a less comfortable reading experience.

In addition, WordPress has entered the era of Block Themes, and Full Site Editing (FSE) offers a more flexible and visual way to customize. I wanted to switch the blog to a theme that is more wide-screen friendly, modern, and actively maintained.

After some research, I chose Twenty Twenty-Five — the latest official WordPress default theme (2025), optimized for blogs and content creation, with native support for Full Site Editing and excellent adaptation for wide screens.

2. Preparations Before Switching

For any theme switch, the first step must always be backup.

I used the UpdraftPlus plugin to perform a complete backup of the website’s files and database.

1.png — UpdraftPlus backup interface

Besides backing up, I also did a few other things:

  • Document the old theme’s custom code: Hueman’s functions.php contains quite a bit of custom functional code I added myself, which needs to be migrated later.
  • Take screenshots of widget and menu settings: Although I decided to abandon the old widget layout, the menu structure needs to be preserved.
  • Plan the new theme’s configuration: Clarify what needs to be adjusted, such as content width, homepage display style, and multilingual menus.

3. Reasons for Choosing Twenty Twenty-Five

Twenty Twenty-Five is the default theme for WordPress 6.7 and later versions, and it offers the following advantages:

  • Full support for Full Site Editing: All layout adjustments can be done visually in the Site Editor.
  • Blog-friendly: Refined typography and an excellent reading experience.
  • Good wide-screen adaptation: Content width and wide width can be freely adjusted in the style settings.
  • Lightweight and fast: No unnecessary dependencies and outstanding performance.
  • Official long-term maintenance: As a default theme, updates are guaranteed.

Of course, it also has a learning curve — for users accustomed to classic themes (like Hueman), the menu management, widgets, and template structure of a block theme all require readjustment. This is exactly what this blog post will document.

4. Future Plans for the Old Theme’s Custom Code

In Hueman’s functions.php, I added the following custom code snippets (see the screenshot of the old theme’s file editor):

2.png — Custom code snippets in functions.php

This code includes:

  1. Disable WordPress Emoji functionality: Removes Emoji JS/CSS to improve loading speed.
  2. Add noindex to thin content tag pages: When a tag has fewer than 2 posts, it automatically outputs <meta name="robots" content="noindex, follow"> to prevent low-quality pages from being indexed.
  3. Adjust the tag cloud display count: Changes the maximum number of tags displayed in the tag widget to 300.

These functions are independent of the theme itself; they are site-level features. Therefore, the best practice is to decouple them from the theme and place them in a site-specific plugin, or manage them using the Code Snippets plugin.

I plan to use the Code Snippets plugin going forward, separating each function into an independent code snippet and setting it to “Only run on site front-end”. This way, no matter what theme I switch to in the future, these features will not be lost.

Note: The load_template( get_template_directory() . '/functions/init-core.php' ); and version check code built into the Hueman theme are internal theme dependencies and cannot be migrated.

5. Configuring the Homepage Display

After activating Twenty Twenty-Five, the homepage might default to showing a static page or a specific template, but what I need is a list of the latest posts, displaying only excerpts instead of full text.

I went to Settings > Reading, selected “Your latest posts” under “Your homepage displays”, and changed “For each article in a feed” to “Excerpt”.

4.png — Reading settings interface

Now the homepage displays as a post list, with each post showing only an excerpt, which fits the reading habits of a technical blog.

6. Multilingual Menu Configuration Process (Key Focus)

My blog supports both Chinese and English, implemented using the free version of Polylang. In Hueman (a classic theme), I could specify a display language for each menu under Appearance > Menus, which was very straightforward.

But in Twenty Twenty-Five (a block theme), things became more complicated:

  • In block themes, menu display locations are no longer controlled by the “Appearance > Menus” page, but rather by the “Navigation” block in the Site Editor.
  • Under a block theme, the free version of Polylang does not display the “Language assignment” dropdown on the menu editing page.
  • This means I cannot directly tell Polylang which language corresponds to the “Chinese Main Menu” and the “English Main Menu”.

I evaluated several approaches:

  1. Create two navigation blocks in the Site Editor, bind them to different menus, and try to use conditional display — but the block theme’s navigation block does not have built-in “display by language” conditional logic.
  2. Conditional Menus plugin — but user feedback indicates known compatibility issues with Polylang, and it cannot recognize “language” as a condition, so I did not use it.
  3. Site Editor Classic Features plugin recommended by Polylang officially — it can restore classic widgets in a block theme, but the operation is somewhat cumbersome, so I did not use it either.

Ultimately, I found a lightweight plugin: TMS Extensions for Polylang. It provides a block called “Menu by Language”, specifically designed to display different navigation menus for each language in a block theme, and it is completely free.

Steps:

  1. Install and activate TMS Extensions for Polylang.
  2. Go to Appearance > Editor and edit the “Header” template.
  3. Find the “Menu by Language” block in the block inserter and add it to an appropriate position in the header.
  4. Click on the block, and in the settings panel on the right, select the corresponding menus (Chinese Main Menu, English Main Menu) for “中文(中国)” and “ENGLISH” respectively.
  5. Save the template.
6.png — Settings interface showing the Menu by Language block

After completing these configurations, the front-end header will automatically switch menus based on the current page language.

7.png — Chinese and English homepage menus

7. Summary

The core work of this theme switch can be summarized in three points:

  1. Backup: Used UpdraftPlus to complete a full site backup, ensuring a rollback option.
  2. Theme selection: Chose Twenty Twenty-Five based on the high proportion of wide-screen visitors.
  3. Multilingual menu configuration: Solved the issue where the free version of Polylang cannot assign menus to different languages under a block theme by using the TMS Extensions for Polylang plugin.

This experience also made me realize that decoupling functional code from the theme (such as by using Code Snippets) is worth investing time in, and I will gradually improve this going forward.

WordPress 分类下拉列表跳转优化:告别 ?category_name=,直接进入最终分类链接<< WordPress 双语文章列表摘要完整显示实战:WPCode + Gutenberg Post Excerpt 的最终验证<< Header 诗词微内容系统实战:从动态动画到稳定静态组件的收敛过程<< WordPress 旧文章移动端图片错位排查:经典编辑器 Caption 固定宽度与缓存验证全过程<< 🧪 WordPress 主题性能对比实测:Hueman vs Twenty Twenty-Five(CDN上线前基线)<< 从经典到块(终章):主题迁移结束,我决定停止折腾<< WordPress 归档页 AdSense 报错 availableWidth=0:从横向滚动条到 Gutenberg 区块结构的排查全过程<< AI 生成的 Logo 还有白边?借助 ChatGPT Plus,彻底解决 WordPress Favicon 方块感<< WordPress 页面出现横向滚动条?一次从 CSS 到区块编辑器的完整排查记录<< 优化 WordPress 热门文章列表间距,提升阅读体验<< WPCode代码片段插入顺序问题:理论与实践的差距<< 从Ad Inserter到WPCode:CTA配置迁移与优化实践<< 记一次 WordPress 2025 主题 Logo 与 Favicon 的折腾之旅<< 记一次由 WPCode 简码引发的 WordPress 500 致命错误排查全记录<< 从Ad Inserter到WPCode:CTA配置迁移与优先级实现<< WordPress 控制台报错排查实录:从 jQuery 冲突到百度统计警告<< WordPress 标签页 noindex 优化:从主题迁移到代码重构的实践分享<< WordPress主题迁移:Emoji处理代码是否需要保留?<< WordPress 日历在 Polylang 多语言环境下的兼容性修复实践<< 搜索结果页太长了?我给WordPress 2025主题做了一次“断舍离”<< 告别参差不齐!只用 CSS 打造适配 2025 主题的现代标签云<< 从单栏到两栏:WordPress分类页统一首页侧边栏及列表结构的实操记录<< 优化 WordPress 2025 主题页脚:多语言导航、社交链接与归档下拉栏的完整改造记录<< WordPress 2025 主题 + Polylang:修复日历链接缺少语言目录的完整记录<< 一次 FSE 分页丢失的排查与修复:从纯布局样板到查询循环<< 为博客首页侧边栏添加多语言「个人品牌」区块<< 修复日历在侧边栏“占不满”的问题:WordPress 2025 主题日历样式优化<< 分类列表下拉菜单的美化与渲染机制调试实录<< WordPress Twenty Twenty-Five 两栏首页改造:Text Blog 小图列表模板完整实操记录<< 实操|WordPress Twenty Twenty-Five 区块主题 Text Blog Home 改造经典两栏首页(双语无损适配)<< WordPress Twenty Twenty-Five 全局宽度布局实操笔记:宽屏全幅+大屏限宽配置方案<< 在 WordPress 2025 主题中,把 Polylang 语言切换器移到右上角的完整记录<< 从Hueman到Twenty Twenty-Five,主题切换与多语言菜单配置

关于作者 · 持续学习与技术实践

我是一名拥有 15 年以上开发经验的技术从业者,自 2013 年起持续运营个人技术博客,记录工作与个人项目中遇到的真实问题,以及解决问题过程中的探索、实践和思考。

除了技术写作,我也在持续开发和维护自己的独立项目,探索新技术和新工具在实际场景中的应用。我始终相信,没有不值得去解决的问题,也没有不值得去学习的技术。

如果这篇文章对你有所帮助,欢迎浏览博客中的其他文章,也欢迎交流技术经验与想法。

关于我  ·  GitHub  ·  邮件联系