The “give_form_grid” shortcode allows you to display your forms in an interactive grid anywhere on your website. It can display a modal window donation form pop up, or redirect your donors to the form page.
Donation Form Grid Shortcode
Say you would like a page to display a number of your site’s donation forms in a nice easy-to-see way. This will help your donors more clearly decide which form to donate to. This shortcode can display a modal window donation form that pops up, or redirect your donors to that form page. Donation goals and featured images can be added to help convey the need for each form.
Shortcode Builder Options
ids= Show forms based on ID. Providing a comma-separated list of IDs will cause the grid to include only those forms. Default “All Forms”
exclude= Comma separated list of Give form ids to exclude from this grid instance.
columns= Set the number of columns you would like to display in your grid. “Best Fit” will automatically adjust the number of columns based on the available space. Default “Best Fit”
show_goal= show/hide. Shows the progress bar of the forms.
show_excerpt= show/hide. Shows the form excerpt.
show_featured_image= show/hide. Displays the featured image of the forms.
display_style= modal_reveal (default) or redirect. “modal_reveal” will pop up a window allowing your donors to make a donation from the form grid page. “Redirect” will take your donors to the single donation form page.
forms_per_page= Shows how many forms will display per page. Pagination controls will be visible if more forms exist. Default “12”
Give Form Grid Shortcode Example
[give_form_grid columns="3" show_goal="true" show_excerpt="true" show_featured_image="true" display_style="modal_reveal" forms_per_page="12"]
Additional Shortcode Attributes
There are some additional shortcode attributes that you can add into your shortcode manually that are not visible in the shortcode builder.
cats— If you have categories enabled in Give, you can list the category IDs that you want displayed in this grid.
NOTE: It must be the category ID, not the slug.
tags— If you have tags enabled in Give, you can list the tag IDs that you want displayed in this grid.
NOTE: It must be the tag ID, not the slug.
paged— This enables/disables pagination. Options are
show_title— This enables/disables displaying the title in the form “card”. Options are
image_size— Set the image size name that you want the form grid to use. Refer to the WordPress Codex on available image size names.
image_height— You can fix the height of the image within the form “card”. This is useful if you have different forms that have images of differing heights.
excerpt_length— You can truncate the exact word-length of the excerpt displayed with this argument. Default value is “16”.
status— You can determine which forms are displayed based on whether they are “closed” or “open”. This is a feature of the Goals setting in your form. If you’ve determined that a form should be “closed” when it reaches it’s goal, then you can set that only “open” campaigns are displayed in the grid.
orderby— “date” is the default. Set what aspect of the form determines the order. Options are
order— Options: ASC, DESC. “DESC” is the default. Set whether the forms are ordered in ascending or descending order, according to the
orderset as so:
[give_form_grid orderby="menu_order" order="DESC"]