Skip to content
Home » Documentation » Contact Form 7 – Dynamic Text Extension » Shortcodes » DTX Shortcode: Site/Blog Information

DTX Shortcode: Site/Blog Information

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.

    Related Post Module Attributes Before

    array(29) {
      ["post_type"]=>
      string(4) "post"
      ["post_id"]=>
      string(1) "0"
      ["exclude"]=>
      string(1) "0"
      ["title"]=>
      string(32) "Related Articles & Tutorials"
      ["description"]=>
      string(0) ""
      ["max"]=>
      string(1) "3"
      ["post_ids"]=>
      string(0) ""
      ["exclude_ids"]=>
      string(0) ""
      ["is_series"]=>
      string(0) ""
      ["featured_term"]=>
      string(3) "307"
      ["exclude_terms"]=>
      string(0) ""
      ["exclusive"]=>
      string(1) "1"
      ["order"]=>
      string(4) "DESC"
      ["show_image"]=>
      string(2) "on"
      ["image_size"]=>
      string(6) "medium"
      ["menu_order_label"]=>
      string(0) ""
      ["show_order_label"]=>
      string(2) "on"
      ["show_date"]=>
      string(2) "on"
      ["show_meta_keys"]=>
      string(2) "on"
      ["show_modified"]=>
      string(0) ""
      ["show_author"]=>
      string(0) ""
      ["show_categories"]=>
      string(0) ""
      ["show_primary_category"]=>
      string(0) ""
      ["show_description"]=>
      string(0) ""
      ["show_reading_time"]=>
      string(2) "on"
      ["show_cta"]=>
      string(2) "on"
      ["cta"]=>
      string(9) "Read more"
      ["autoplay"]=>
      string(0) ""
      ["allow_sticky"]=>
      string(0) ""
    }
    

    Related Post Module Attributes

    array(29) {
      ["post_type"]=>
      string(4) "post"
      ["post_id"]=>
      string(1) "0"
      ["exclude"]=>
      string(1) "0"
      ["title"]=>
      string(32) "Related Articles & Tutorials"
      ["description"]=>
      string(0) ""
      ["max"]=>
      string(1) "3"
      ["post_ids"]=>
      string(0) ""
      ["exclude_ids"]=>
      string(0) ""
      ["is_series"]=>
      string(0) ""
      ["featured_term"]=>
      string(3) "307"
      ["exclude_terms"]=>
      string(0) ""
      ["exclusive"]=>
      string(1) "1"
      ["order"]=>
      string(4) "DESC"
      ["show_image"]=>
      string(2) "on"
      ["image_size"]=>
      string(6) "medium"
      ["menu_order_label"]=>
      string(0) ""
      ["show_order_label"]=>
      string(2) "on"
      ["show_date"]=>
      string(2) "on"
      ["show_meta_keys"]=>
      string(2) "on"
      ["show_modified"]=>
      string(0) ""
      ["show_author"]=>
      string(0) ""
      ["show_categories"]=>
      string(0) ""
      ["show_primary_category"]=>
      string(0) ""
      ["show_description"]=>
      string(0) ""
      ["show_reading_time"]=>
      string(2) "on"
      ["show_cta"]=>
      string(2) "on"
      ["cta"]=>
      string(9) "Read more"
      ["autoplay"]=>
      string(0) ""
      ["allow_sticky"]=>
      string(0) ""
    }