There are two methods for generating a link to a post created by Gravity Forms. Both methods are intended for use in Gravity Forms’ confirmations and notifications (and another other place merge tags are support post-submission).
If you are automatically publishing user submitted posts, this is helpful for providing a link immediately to the user where they can preview their newly created post.
1. Short Link
This method requires no custom code and uses the default {post_id}
merge tag.
<a href="http://yoursite.com/?p={post_id}">Post Title</a>
2. Permalink
This method requires some custom code which adds support for the {post_permalink}
. The code also makes this merge tag available for selection in the merge tag list
<a href="{post_permalink}">{Post Title:1}</a>
Step by Step
- Click the “Download Code” button above. It will open the “raw” code in a new tab.
- Select all of the code and copy and paste it into your theme’s functions.php file or as a snippet via a plugin like Code Snippets.
- Go to your Confirmation or Notification and select the “Post Permalink” option from the merge tag list (see the screenshot above).
Does this answer your question?
If it doesn’t, let us know in the comments.