【发布时间】:2014-07-18 21:32:18
【问题描述】:
通过这样做:
if (has_tag( "my-tag-slug", $post )) { $postsTag = "my-tag-slug"; $tagImageFormat = ".jpg"; }
我明白了:
- a variable named $postsTag containing the string "my-tag-slug"
- a variable named $tagImageFormat containing the string ".jpg"
具有此 slug 的标签的名称是“我的标签 slug”。我怎样才能得到以下信息:
- a variable named $postsTagName containing the string "My tag slug"
通过使用我从函数中获取的 slug?
【问题讨论】: