contact form 7特殊功能(Special Mail Tags)

wordpress的联系表单插件中,相必contact form 7算是最有人气的了,功能也是非常强大,使用也很方便,最重要的是免费。那么今天给大家分享一些关于这个插件的一些特殊功能,以便满足不同的业务需求,比如很久前我的一个客户就说了,如何知道我的收到的客户询盘是来自哪个产品的呢?这个相必在外贸或者是贸易中经常用的一个功能,这个时候我们需要这么做:跟踪这个电邮发送的页面url地址,那么不就可以知道客户是来自哪个产品的了么,好的废话少说,直接贴出来:

Special Mail Tags for Submissions

[_remote_ip] — This tag is replaced by the submitter’s IP address.

[_user_agent] — This tag is replaced by the submitter’s user agent (browser) information.

[_url] — This tag is replaced by the URL of the page in which the contact form is placed.

[_date] — This tag is replaced by the date of the submission.

[_time] — This tag is replaced by the time of the submission.

[_invalid_fields] — This tag is replaced by the number of form fields with invalid input.

[_serial_number] — This tag is replaced by a numeric string whose value increments, so this tag can work as the serial number of each submission. Requires Flamingo 1.5+ be installed.

Post-Related Special Mail Tags

These special mail-tags provide information about the post that contains the contact form.

Be aware that these [_post_*] tags work only when the contact form is placed inside post content. In cases where the contact form is outside of post content, such as when the contact form is placed in a sidebar widget or embedded in a theme’s template file, a blank text will replace the tag.

[_post_id] — This tag is replaced by the ID of the post.

[_post_name] — This tag is replaced by the name (slug) of the post.

[_post_title] — This tag is replaced by the title of the post.

[_post_url] — This tag is replaced by the permalink URL of the post.

[_post_author] — This tag is replaced by the author name of the post.

[_post_author_email] — This tag is replaced by the author email of the post.

Site-Related Special Mail Tags

These special mail-tags provide information about the WordPress website on which you manage the contact forms. You’ll find them especially useful when you want to reuse the same set of contact form templates between many websites, because you are freed from manual modification of the site information for each website.

[_site_title] — This tag is replaced by the title of the website.

[_site_description] — This tag is replaced by the description (tagline) of the website.

[_site_url] — This tag is replaced by the home URL of the website.

[_site_admin_email] — This tag is replaced by the email address of the primary admin user of the website.

User-Related Special Mail Tags

These special mail-tags provide information about the current logged-in user.

Since these [_user_*] tags work only when the submitter has an account on the WordPress site and is logged in, it is recommended to turn on the subscribers-only mode setting anytime you use these tags.

If you want to use these tags but don’t want to use the subscribers-only mode, explicitly turn on the nonce setting. Otherwise, the logged-in user data will be reset by the WP REST API, and a blank text will replace the tag.

[_user_login] — This tag is replaced by the login name of the user.

[_user_email] — This tag is replaced by the email address of the user.

[_user_url] — This tag is replaced by the website URL of the user.

[_user_first_name] — This tag is replaced by the first name of the user.

[_user_last_name] — This tag is replaced by the last name of the user.

[_user_nickname] — This tag is replaced by the nickname of the user.

[_user_display_name] — This tag is replaced by the display name of the user.

笔者很负责的说,这篇文章,我只是一个热心的搬运工,让大家能够方便的解决问题。看不懂的,可以用谷歌翻译下,然后自己实践一下即可。

未经允许不得转载:哈勃私语 » contact form 7特殊功能(Special Mail Tags)

本文共2971个字 创建时间:2018年3月6日19:17   

分享到:更多 ()