Contact Form 7 不能显示访客网址post url

自从整站迁移后,wordpress的 contact form 7出现故障,表现为可正常接受客户输入的文字信息,但无法获取 post_url 和 post_title, 这两个标签分别是 访问网址 和 页面标题。小事不小,我为此失去两个客户询单,其实问题不大,主要难点在于排查故障,毕竟Wordpress现在是越来越臃肿庞大。初步怀疑是插件兼容性问题,之后是迁移后的环境变化问题,都无果。

最后终于找到了,原来的 contact form 7插件默认提示用的标签是[post_url] 和 [post_title]而且工作正常。但新版本改为 [_post_url]和[_post_title] ,没错就是前面多加一个“_”。注意,这些标签在 Contact Form DB 这个插件后台看还是只显示标签而非超链接和标题名,得在收到的邮件里面才会显示。

附官网的一些标签

TAG THIS TAG WILL BE REPLACED BY …
[_remote_ip] the sender’s client IP address.
[_user_agent] the sender’s user agent information.
[_url] the URL of the contact form.
[_date] the date of the submission.
[_time] the time of the submission.
[_post_id] the ID of the post which contains the contact form.
[_post_name] the name (slug) of the post which contains the contact form.
[_post_title] the title of the post which contains the contact form.
[_post_url] the permalink of the post which contains the contact form.
[_post_author] the author name of the post which contains the contact form.
[_post_author_email] the author email of the post which contains the contact form.
[_serial_number] a numeric string whose value increments. Requires Flamingo 1.5+ be installed.

发表评论

电子邮件地址不会被公开。 必填项已用*标注