Hi Yael,
Not quite, but you’re close! Whenever you want to override a template file, it’s in relation to the templates folder in Charitable. So this:
templates/donation-form/form-donation.php
Becomes this:
charitable/donation-form/form-donation.php
Many of the template files also have a little comment at the top of the file to say where they should be overridden.
Hope that makes sense!
Cheers,
Eric
Okay, I realize my real question is this:
when I added edited template files to our theme folder, we do not need to include the templates folder.
So I create a new folder in my child theme called charitable and then directly below that add relevant folders / files.
So:
/wp-content/themes/mytheme/charitable/campaigns/donate-button.php
and
/wp-content/themes/mytheme/charitable/donation-form/form-donation.php
Yes?
Great, Eric, thanks for confirming I have the correct file structure.
Could you also confirm relevant files, as I’ve edited a number of files and have only managed to change Donate in one place — the popup donation window.
These are the files I edited:
/wp-content/themes/mytheme/charitable/campaigns/donate-button.php
/wp-content/themes/mytheme/charitable/campaigns/donate-link.php
/wp-content/themes/mytheme/charitable/campaigns/donate-modal.php
/wp-content/themes/mytheme/charitable/campaigns/summary-donors.php
/wp-content/themes/mytheme/charitable/donation-form/donation-amount-header.php
/wp-content/themes/mytheme/charitable/donation-form/form-donation.php
/wp-content/themes/mytheme/charitable/campaign-loop/donation-link.php
and here is a link to a test campaign:
http://dekalbalphas.org/campaigns/christian-bernard/
I think I’ve edited the correct files, however, I’m only seeing one chnage.
I thought perhaps this was a cache issue but since I am seeing the one change in the popup window, perhaps I need to edit different / additional files?
thanks Yael
Hi Yael,
Sorry, there is one little mistake in the first four template files. Instead of /wp-content/themes/mytheme/charitable/campaigns/, it should be /wp-content/themes/mytheme/charitable/campaign/ — just change the folder name from campaigns to campaign.
That should resolve the issue.
Cheers,
Eric
Thanks, Eric, I had a feeling I was overlooking something really simple!