An Overview of Shortcodes Added by GravityView
GravityView adds several shortcodes to WordPress. In this article, we’ll give you a brief overview of the different shortcodes added by GravityView and how each one works.
The [gravityview] Shortcode
You can use the
[gravityview] shortcode to embed Views on your website. The shortcode accepts a range of parameters for filtering entries, displaying details about a View, and more. You can use the
[gravityview] shortcode on pages, posts, sidebar widgets, or even inside other Views.
The [gvlogic] Shortcode
[gvlogic] shortcode allows you to show or hide content based on conditions that you define. If you’re familiar with conditional logic in Gravity Forms, then you’ll recognize the power of the
[gvlogic] you can show/hide content based on login status, user role, user-submitted form values, and more. You can use the shortcode anywhere on your site (including inside the GravityView Custom Content field)!
The [gv_entry_link] Shortcode
You can use the
[gv_entry_link] shortcode to generate a link that allows users to view, edit or delete a specific entry in GravityView. You can add the shortcode to a post/page on your website or paste it inside a GravityView Custom Content field.
The [gvfield] Shortcode
[gvfield] shortcode allows you to display a field value from any entry in one of your Views. This is useful if you want to display the name of the last member added to your directory, or the amount of the last donation you received, for example. There are plenty of other use cases as well! You can use the
[gvfield] shortcode anywhere on your site.
The [gventry] Shortcode
[gventry] shortcode allows you to embed a specific GravityView entry on your website or inside another View using the Custom Content field.
The [gv_age] Shortcode
[gv_age] shortcode allows you to calculate age based on a Gravity Forms Date field. You can use the shortcode inside a GravityView Custom Content field.
The [gv_pageviews] Shortcode
[gv_pageviews] shortcode allows you to track views to an entry when you have the Pageviews plugin activated on your site. You can add the
[gv_pageviews] shortcode to the Single Entry page and it will display the number of visits that entry has received.