- This topic has 6 replies, 2 voices, and was last updated 2 years, 7 months ago by
Tanvir.
Hi, since the Support forum is not searchable I couldn’t easily find if this is already answered.
Why when the plugin is updated, the custom created .php template files are deleted too? Can’t you preserve them or have an option to put them in a separate folder that will not delete them when updating?
Hello,
Thanks for contacting us.
If you create the templates in active theme file, then when you update the plugin it will not be deleted.
But if you update the parent theme and custom templates are in it, then it will be deleted.
So it is recommended to keep those in activated child theme
Regards
Tanvir
Hi, I think we misunderstood each other. I was thinking on download-manager link template files located here:
/wp-content/plugins/download-manager/src/Package/views/link-templates/link-template-default.php
If I create a new .php template file as instructed in the Admin message on top, then if the plugin get’s updated it deletes those files. How can that be avoided?
Thank you
Hi Matt,
Thanks for the clarification. It is clear to me now.
You can follow the doc below and my suggestion in previous reply. It will not delete the files as those will be kept in child theme.
Regards
Tanvir
Hi, I tried your method before I contacted you here, but for some reason this does not work for me.
Here is the “original” file path:
/public_html/wp-content/plugins/download-manager/src/Package/views/link-templates/link-template-custom.php
If I move that file here:
/public_html/wp-content/themes/twentytwentyone-child/download-manager/src/Package/views/link-templates/link-template-custom.php
by your instructions then this should work, but it does not.
In the place where this code should be displayed on the site I only get:
link-template-custom.php, meaning that it still is looking for this file on the “original” location rather than in the “active theme” download-manager folder. Do you have any idea why this is happening?
Thank you
Hi, sorry, I’m stupid.
I was using original folder structure, but custom link template file only needs to go here, not the full original structure /{active-theme}/download-manager/link-templates
My bad. Thank you!
The topic "Updating the plugin deletes custom templates" is closed to new replies.