Give is designed to look great out of the box. But you might want to customize the markup of your single Give form pages, or your Give Archive page. Your theme might have some advanced markup that you need Give to recognize. These articles are here to help you navigate how to do that with Give.
Your Give forms are created with what’s called a “Custom Post Type“. This is a powerful feature of WordPress which allows plugins like Give to create custom pages which will still load seamlessly into your theme’s native content area.
There are two main templates that Give uses to display forms. (1) the Give Single form page; and (2) The Give Forms Archive page.
The Give Single form page
The Give single form page naming scheme
According to the WordPress Template heirarchy, single pages of Custom Post Types should follow a simple pattern in how they are named:
By default, that is the template that Give uses to display any of your form pages. This file is found in the Give plugin here:
If you wanted to make some simple changes to this page, like add a custom title at the top, you could follow these steps:
- Create a “give” folder inside your theme
- Copy the `single-give-form.php` file and place it into that folder
- Make your changes
Did you know you can view ALL of your Give Forms on one page automatically? It's called the Give Archive page. It can be a very powerful way to show all the ways your donors can "Give" to you.
The Give Archive page naming scheme
The Give Archive page works just like your Posts Archive page. It lists all the single Give forms you have created onto one nicely formatted page. By default, that will be either from your `archive.php` file in your theme, or the `index.php` file.
If you want to customize the layout of that page, you can take these steps:
- Copy either your `archive.php` or `index.php` file
- Rename the copied file to `archive-give_forms.php`
- Make sure that file stays in the root of your theme folder
- Make your changes there.