wordpress技术文档

wordpress的网址url不要大写

日期:2020-05-16 阅读:1015

 

wordpress会主动把别名的大写,转为小写。

但搜索引擎是不关心大小写的。而且大写对用户来说,也不好记。

所以建议不要给url大写。

虽然下面的做法,可以让wordpress允许大写。但最好不要这们操作。

----------

https://wordpress.stackexchange.com/questions/5029/how-can-i-make-capital-letter-upper-case-permalinks

The page URLs are defined by the slugs, and by default they are formatted and lower-cased by the function sanitize_title_with_dashes(). However, this function is called via a filter, and you can unhook the filter so it doesn't get called:

remove_filter( 'sanitize_title', 'sanitize_title_with_dashes' );