Theming with GiveWP
GiveWP is designed to look great out of the box. But you might want to customize the markup of your single GiveWP form pages or your GiveWP Archive page. Your theme might have some advanced markup that you need GiveWP to recognize. These articles are here to help you navigate how to do that with GiveWP.
Articles in this section:
Theming Overview
Your GiveWP forms are created with what’s called a “Custom Post Type“. This is a powerful feature of WordPress which allows plugins like GiveWP to create custom pages which will still load seamlessly into your theme’s native content area.
There are two main templates that GiveWP uses to display forms. (1) the GiveWP Single form page; and (2) The GiveWP Forms Archive page.
The GiveWP Single form page
The GiveWP single form page naming scheme
your-theme/give/single-give-form.php
According to the WordPress Template heirarchy, single pages of Custom Post Types should follow a simple pattern in how they are named:
single-{post_type}.php
By default, that is the template that GiveWP uses to display any of your form pages. This file is found in the GiveWP plugin here:
/wp-content/plugins/give/templates/single-give-form.php
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 GiveWP Forms on one page automatically? It’s called the GiveWP Archive page. It can be a very powerful way to show all the ways your donors can “Give” to you.
The GiveWP Archive page naming scheme
your-theme/archive-give_forms.php
The GiveWP Archive page works just like your Posts Archive page. It lists all the single GiveWP 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.