Hi there,
Donors and recent transations are both Post Types that you can query using WP_Query.
This code example was created by one of our users. It’s a shortcode that lists the name of the most recent donors. Try that out and you can customize it however you like:
https://gist.github.com/jasontucker/dcf1a308716407c394f1be2cf21ae2f5
Thanks!
Hi,
Thanks for providing the link. One question, in which file would I paste in the code? And what is the shortcode for it?
Thank you
If you need guidance implementing custom PHP functions on your website, we have this guide here: https://givewp.com/documentation/resources/adding-custom-functions-to-your-wordpress-website/
The shortcode will display the latest donors, their name and last initial, and the donation amount in a list.
Also, I’d recommend using this updated version instead now:
https://github.com/WordImpress/Give-Snippet-Library/blob/master/useful-queries/recent-donors-shortcode.php
Thanks!