I was watching this video on how to customize WP theme: https://www.youtube.com/watch?v=O8Nnn06Um0I
It seems like I have to copy the whole php from the parent theme to the child theme and modify it in the child theme.
My question: Is there a better way of doing this so that when the parent theme's upgrade, I don't have to diff it with my changes?
A) If that question is too much of an opinion-based question, I would like to ask if there's a way to change the output HTML from a plugin dynamically?
B) Or, more generically, is there a way to customize the theme by writing a plugin instead of creating a child theme? Can you go over when that will be beneficial and how to achieve?
2/9/17 UPDATE: Changed title from "How can I customize a theme via a plugin/change HTML output/change only a portion of the php file?" to "How can I customize a theme via a plugin?"
Thank you to everyone (@David Lee, @Samyer, @Rick Hellewell) who tried to answer this question so far... I do understand how to create a child theme and the answer that I got so far is that it's best to customize the theme by using a child theme, not via a plugin.
I'm updating my question because if I use the child theme approach, my question would then be the same one as the one listed here: Theme/Plugin customization (specifically for classiads): Where do I change the code?
Now, I know it's not recommended, but just so that I understand my options, my question is: What is the "best" way to update a theme via a plugin? I'm looking to understand how this works also. i.e.: Since it's not in a child theme, will the css all be stored in the DB somewhere and when the HTML output is rendered, one intercept it and modify the HTML or something?
Thank you.