Hi @saz25,
Replacing that text on a form by form basis would require a bit of custom code, that you can see here:
https://github.com/impress-org/givewp-snippet-library/blob/master/translation-snippets/change-text-locally-per-form.php
Lines 17, 18, and 33 would need some editing before you use that code in production.
The string to target on line 17 would be ‘Leave a comment’
Then make sure you enter the form ID for the Form on line 33.
If you need assistance implementing custom PHP code on your website we have this guide:
https://givewp.com/documentation/resources/adding-custom-functions-to-your-wordpress-website/
Please note that this code snippet is provided as an example of how you can extend GiveWP with code. It’s up to you to implement and customize to your liking. We cannot provide support for custom code on your website, only the code that we create and distribute.
Let me know if that resolves things, or if you need further assistance. Thanks for using GiveWP! Have a great day.
Thread Starter
saz25
(@saz25)
Hi,
I realize, that using my theme’s functions.php isn’t the best practice. For other changes to other plugins, I have overrdied specific files and placed the modified file in my child’s theme structure.
Would that work in this case?
Does your plugin recommend that approach?
thanks
Thread Starter
saz25
(@saz25)
Hi
Thanks for the super fast reply.
If I can use child theme override, can you tell me what file (and its location) I need to copy/edit and then put in the child theme tree?
I already have about 3 files I am overriding in my child them for other plugins.
thanks.
Thread Starter
saz25
(@saz25)
Hi,
I found another solution. It works, at least for now. Will it stand the test of time with future updates?
Here is what I did. First of all I tried to avoid adding yet another plugin.
So I used the snippit you sent me and I placed it in my child theme functions.php.
Then I modified the string I was looking for and the new string as well as the form id.
It works, but will it survive a future update to my theme or GiveWP?
Is this a good and safe approach?
thanks again.
That approach should work. At least, until you update the child theme, which in most cases, does not happen often. What you usually update is the parent theme.
IF I were in your position, I’d save a copy of the child theme’s functions.php file somewhere you can easily copy from like Github or Codepen.