Pinyin Slugs


Chinese characters don’t come out good in permalinks. Without the Pinyin Slugs plugin activated, the example post I made for the screenshot will get a slug like this: %e6%90%9c%e7%b4%a2%e5%bc%95%e6%93%8e%e4%bc%98%e5%8c%96. With the plugin the slug automatically becomes sousuoyinqingyouhua.

Search engines such as Baidu cannot make much of the first slug, but they can handle pinyin perfectly, especially when it is written as one long string without hyphens or underscores.

It is possible to limit the amount of characters in the slug. The default is 100, which should be plenty for most.

The Pinyin Slugs plugin was forked from the Pinyin Permalinks plugin by user xiaole_tao as that project seemed abandoned. There have been many improvements since; read the changelog for details.

I have decided to only support this plugin through Github. Therefore, if you have any questions, need help and/or want to make a feature request, please open an issue over at Github. You can also browse through open and closed issues to find what you are looking for and perhaps even help others.


Thanks for your understanding and cooperation.

WPML Compatible

The Pinyin Slugs plugin has received the WPML Certification of Compatibility and is featured on the WPML website with the article How to Build a WordPress Website in China and Reach an International Audience.


  • Settings page
  • New Post with title in Chinese characters and auto-generated pinyin slug; Baidu Search Results page underneath
  • WPML Compatible



Search for “Pinyin Slugs” and install with the Plugins > Add New back-end page.

… OR …

Follow these steps:

  1. Download zip file.
  2. Upload the zip file via the Plugins > Add New > Upload page … OR … unpack and upload with your favorite FTP client to the /plugins/ folder.
  3. Activate the plugin on the Plugins page.



Does Pinyin Slugs work with Simplified Chinese characters?

Yes, the plugin transforms Simplified Chinese slugs into pinyin.

Does Pinyin Slugs work with Traditional Chinese characters?

Yes, since September 2020 the plugin also can transform Traditional Chinese slugs into pinyin.

Does Pinyin Slugs work with the WP block editor?

Yes, it does, although one caveat is that to be able to see the change of slug, the post/page first needs to be saved. The same applies for edits.

Known Issues

Pinyin Slugs will not auto-transform existing slugs, you will have to change them manually.

I have an issue with this plugin, where can I get support?

Please open an issue over at Github, as I will not use the support forums here on


2024년 7월 9일 답글 1개
Works simple and fine. Thank you very much!
2016년 9월 3일 답글 1개
I am setting up my Chinese blog and this plugin is so handy, it handles the pinyin slugs perfectly, I would like to thank the author for the great efforts. Thanks Alex
모든 8 평가 읽기

기여자 & 개발자

“Pinyin Slugs”(은)는 오픈 소스 소프트웨어입니다. 다음의 사람들이 이 플러그인에 기여하였습니다.


“Pinyin Slugs”(이)가 8 개 언어로 번역되었습니다. 기여해 주셔서 번역자님께 감사드립니다.

자국어로 “Pinyin Slugs”(을)를 번역하세요.

개발에 관심이 있으십니까?

코드 탐색하기는, SVN 저장소를 확인하시거나, 개발 기록RSS로 구독하세요.



  • date: July 9, 2024
  • add new $autoload parameter (WP 6.6)
  • tested up to WP 6.6
  • removed logo from Settings page


  • date: November 27, 2023
  • last security fix introduced problem where spaces in Title where no longer replaced by hyphens, this version brings back those hyphens (issue 23 thanks for pointing it out @nhimthaoan)


  • date: November 23, 2023
  • security fix CVE-2023-47511 Cross Site Scripting (XSS) vulnerability (issue 22 thanks for pointing it out @ramiror)


  • date: August 27, 2023
  • fix Slug Length function (issue 19 thanks for reporting @zhouLife)


  • date: October 25, 2022
  • edits in readme files and on Settings page


  • date: September 16, 2020
  • dictionary update: UniHan database using the kMandarin Reading field as pinyin phonetic keys (; with many thanks to Yun-yu Shen @ujamer
  • edits in readme files and on Settings page


  • date: October 29, 2018
  • tested up to WP 5.0
  • tested up to ClassicPress 1.0.0


  • date: July 8, 2018
  • tested up to WP 4.9.7


  • date: March 15, 2017
  • add sanitize_title filter once the file has been included as per suggestion of Polylang author @Chouby
  • tidying up


  • date: November 29, 2016
  • remove version check
  • tested up to WP 4.7


  • date: March 10, 2016
  • fix to not ignore alphanumerical characters by vanabel, closes issue #4


  • date: August 7, 2015
  • TWEAK: header settings page; only showed half logo after 2.0.3 update


  • date: August 5, 2015
  • changed header settings page to h1 (
  • show 4.3 compatibility



  • date: April 9, 2015
  • changed logos
  • new banner image for Repo by Joschko Hammermann


  • date: July 29, 2014
  • due to non-compatibility issues with WP 4.0, complete rewrite of the plugin from the ground up
  • bump minimum required WP version up to 3.8


  • date: December 28, 2013
  • fix reported bug that causes entire admin to be a maximum width of 48rem


  • date: December 26, 2013
  • tested up to WP 3.9-alpha
  • settings page overhaul to better match WP 3.8 style
  • change version number format
  • change links


  • change text domain to prepare for language packs (via Otto –


  • compatible up to WordPress 3.7
  • redo version check, min. requirement WordPress 3.6
  • change Github link
  • add Dutch language files
  • add WPML accreditation


  • separate dictionary.php file
  • add Mandarin Chinese language files
  • edit readme.txt and
  • fix textdomain issue


  • First stable release