Why not just download a fresh copy of the theme, extract it and get the sidebar code from that?
I have made a lot of changes on the theme. Do I have to do it all again?
Yes…unless you have a backup.
ALWAYS make backups after each change
I have made a lot of changes on the theme. Do I have to do it all again?
Just upload only the sidebar code, not the entire theme.
And, as RVoodoo noted, you’ll likely want to get in the habit of backing up your theme before you make changes.
Thanks, I solved it, but I had to save the codes in a word file. How do I made a backup?
There are a number of WordPress backup plugins you could look at. Personally, I just use SCP or FTP and keep a backup copy of my theme on my local PC (which is also where I do my editing).