This shortcode returns the site title (set in Settings > General).
[CF7_bloginfo]
This shortcode also includes an optional key attribute where you can specify a key for the type of site information you want to pull.
[CF7_bloginfo key="<insert key>"]
Example
If I wanted to prepopulate a dynamic field with the site administrator’s email address, the value of my dynamic field would use this:
CF7_bloginfo key='admin_email'
And then the dynamic text form tag would look like this:
[dynamictext inputname "CF7_bloginfo key='admin_email'"]
Possible Options
Any value that is also possible as the $show value for get_bloginfo() that returns a string or numeric value is acceptable such as:
- Site title:
CF7_bloginfo key='name' - Site description/tagline:
CF7_bloginfo key='description' - Site URL:
CF7_bloginfo key='url' - Site administrator’s email address:
CF7_bloginfo key='admin_email' - RSS 2.0 feed URL:
CF7_bloginfo key='rss2_url'
Cache Compatibility
If cache compatibility mode is enabled for the form tag that uses this built-in shortcode, it does not make an AJAX request. Instead, it simply uses the preexisting value because the value retrieved by this shortcode is safe to cache.
Demo
Check it out! The demo form below is using this built-in shortcode to pull in my website’s title and tagline!
View Source Code
View the source code for this shortcode included with DTX.