PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Insert blog info?

  1. Hi there,

    I was wondering if it's possible to insert Wordpress variables such as bloginfo( 'name' ); ? I'd like to use this for the email notifications...

    thnx!
    -jennyb

    Posted 11 years ago on Monday November 26, 2012 | Permalink
  2. David Peralty

    Our notifications section doesn't allow this. I guess my question would be "why do you want or need it?" You could use gform_pre_render to add the details to a hidden field in a form, so that you could then use a merge tag with the information in your notification, but these kinds of things are fairly static. Your blog name doesn't change often, does it?

    Posted 11 years ago on Monday November 26, 2012 | Permalink
  3. Hi David,

    Thanks for the speedy reply. In this instance, I'm running GF on a multisite install. Each site, except the main site, has the same form. However, although the information is the same, I'd like to personalize the email notifications with something like "Hello [blogname], you've received a new message."

    Ideas about how I might go about this?

    thnx!
    -jennyb

    Posted 11 years ago on Monday November 26, 2012 | Permalink
  4. David Peralty

    Yeah, we don't have a merge tag for that. Check out all of our merge tag options here:
    http://www.gravityhelp.com/documentation/page/Merge_Tags

    You would not only have to create a field in the form, but also add to their functions.php file to grab the site title and push it into a field so you could use it in the notifications settings. I'm sure that isn't as easy as you were hoping, but there is no automated way for us to currently do what you are requesting.

    Posted 11 years ago on Monday November 26, 2012 | Permalink
  5. I believe the email notifications will process shortcodes. If that works for you, you could always grab a plugin which provides a 'bloginfo' shortcode, and use the shortcode in the notification, something like [bloginfo key='name']. Something like this function right here:

    http://css-tricks.com/snippets/wordpress/bloginfo-shortcode/

    Posted 11 years ago on Tuesday November 27, 2012 | Permalink
  6. Hey thanks Chris - just revisiting this now after all this time. Got side-tracked from this particular project for a while, but this is a great lead, cheers!
    -jennyb

    Posted 11 years ago on Monday March 25, 2013 | Permalink
  7. Let us know if it does not work out. I use those shortcodes all the time now for places where I don't allow users to use PHP.

    Posted 11 years ago on Monday March 25, 2013 | Permalink