Updating the plugin deletes custom templates

in Download Manager Free

Viewing 7 posts - 1 through 7 (of 7 total)
Jun 14, 2023 at 12:07 pm
#187927
Participant
Matt Fond
OP

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?

Jun 14, 2023 at 5:06 pm
#187936
Spectator
Tanvir

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

Jun 14, 2023 at 7:30 pm
#187943
Participant
Matt Fond
OP

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

Jun 15, 2023 at 11:28 am
#187962
Spectator
Tanvir

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.

Template Files

Regards
Tanvir

Jun 17, 2023 at 10:20 pm
#187996
Participant
Matt Fond
OP

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

Jun 17, 2023 at 10:32 pm
#187997
Participant
Matt Fond
OP

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!

Jun 19, 2023 at 4:49 pm
#188027
Spectator
Tanvir

You are welcome.
Don’t hesitate to open a new topic if you face another issue.

Regards
Tanvir

Viewing 7 posts - 1 through 7 (of 7 total)

The topic "Updating the plugin deletes custom templates" is closed to new replies.