Ok so ive kinda switched between 2 methods for this but settled on the current one for the purpose of optimization
So at first I tried setting up basically a javascript variable injecting code thing. Basically, i have a js file where i keep the sidebar code and then i just add the div where i want it in the page and it would stay the same across all pages
however, this was not optimal as it required a LOT of javascript.
ive come up with a better method I think, and thats a SITE BASE. I have basically a site that is the base code for others. Its got all the different sidebar divs, and whenever I update something on the sidebear, i always start on the sitebase page and then copy and paste it to my other pages. This is a bit more work btu I think is more optimal and helps for the issue of which boxes I want in the sidebars on different pages (for example, i have my "Amigos Do dia" div on the homepage sidebear but not on my OC page)
as for links, i do use a variable system for it. This helps if I change a site's file name (for example, changing my homepage to index). I can basically just go into the js file and edit the link the variable leads to so that anywhere that variable is used itll update.