Pinyin Slugs

Stable version WordPress Plugins Directory, Source/Fork: Github,
Support Github issues

Transforms Chinese character titles into a permalink friendly slug, showing pinyin that can be read by humans and (Chinese) search engines alike.

The Pinyin Slugs plugin is a fork of the original Pinyin Permalinks plugin by xiaole_tao who has seemingly abandoned his plugin as he never responded to emails.

The original plugin can basically only be used on Chinese only websites; as soon as you install it on a bi/multilingual site it messes up the slugs of the non-Chinese languages.

This fork has been adapted by my ex-colleague Denis Cao in such a way that the slugs of the non-Chinese language remain untouched and only the Chinese character slugs will be transformed into pinyin.

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 obviously 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.

So instead of transforming "中国" into two separate words divided by a hyphen or an underscore (the original plugin has this as options), it is best transformed into “zhongguo”. The only option Pinyin Slugs therefore has, is the length that you can limit to an x amount of letters. The default is 100, which should be plenty for most.

Joschko Hammermann