Sounds like what you need is a child theme. With a child theme, you can override both original, parent theme and plugin code without theme and plugin updates wiping out your changes.
You can find an overview of child theme development here: https://codex.www.ads-software.com/Child_Themes
Note also that you’ll need to keep the parent theme installed so your child theme will work, since you’re overriding only selected bits of code. The codex is pretty straightforward, but if you have any problems or questions, let me know and I’ll try to walk you through it.
]]>As noted on that page, you are much better off using the action and filter hooks provided instead of altering templates. But sometimes there is no better solution other than overriding templates.
]]>