wordpress标签名称之间的whitespcace不适用于Feed

时间:2015-02-22 16:19:07

标签: php wordpress

如果我正在使用

http://example.net/?tag=tag1_without_whitepsace,tag2_without_whitespace&feed=rss2

然后它工作正常,并为我提供标记为tag1_without_whitepsace和tag2_without_whitespace的所有帖子。另一方面,如果我正在使用

带有whitepsace的

http://example.net/?tag=tag1,带有空白的tag2& feed = rss2

然后我在我的Feed中没有得到任何结果,虽然我使用带有whitepsace的tag1和带有whitepsace的tag2标记了许多帖子。我知道在url空格中是不允许的,但是我需要使用这种类型的标签获得正确的feed结果。请任何人帮助我..

1 个答案:

答案 0 :(得分:0)

当您在信息中心的标签,类别或帖子标题等中添加空格时,系统会自动将其转换为-以便使用它,即如果您输入tag 1它将会转换为tag-1(with a space here)tag2(with another space here)空格将被忽略。

您永远不会在网址参数和Feed中使用空格,请在此处阅读http://codex.wordpress.org/WordPress_Feeds以显示多个标记。