Updating an overriden theme
- This topic has 7 replies, 3 voices, and was last updated 6 days, 13 hours ago by .
July 26, 2022 at 6:54 pm #7875stripedzebra1
Is there any way to automatically update your overridden theme to a new version of the theme without copy/pasting all the custom code you wrote? I think I was able to do this in the past, but it’s not working with the new update.July 27, 2022 at 3:09 am #7877kensquires
step 1 – back up your stuff… as in copy your publii folder to a external drive. I’m 90% sure this will work but in the event that something gets screwed up at least you have a backup
step 2 – on the top right of publii you’ll see three dots click on them then click on themes you’ll see all the themes you have installed, you can get updated versions of the themes directly on the site so go and get it.
step 3 – still being on the theme screen in publii you can install a theme and it’ll overwrite the old one, but any custom code will remain as I remember with the TechNews theme I did custom code for background/link colours and everything stayed.
step 4 – go back to the main section of publii where you can add/modify the SEO.. at the top of that page you’ll see your sites name and under that the language and under that the theme your using. Uninstall the theme, click on the theme and at the bottom of that list you’ll see it listed as uninstall when you click on the theme that’s listed under uninstall it’ll remove the old theme… Don’t panic. Click on the theme you were using as the version # was updated, it’ll ask to resample your images.. I think the word is resample but I don’t have publii open at the moment. Just click yes (trust me) it’ll rescan/resample your images.
To make sure everything works click on the preview button on the left and it should look how it was prior to the theme update.
Hope this helpedJuly 28, 2022 at 3:03 am #7879stripedzebra1
Unfortunately I’ve tried this numerous times and it doesn’t work 🙁 but it worked in the last version of Publii
I hope a dev can helpJuly 30, 2022 at 4:35 pm #7893Tomasz Dziuda
I am not sure if I understand the issue.
Are you using theme overrides: https://getpublii.com/dev/theme-overrides/ (the proper way) or do you override theme files directly (the incorrect way)?
Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!July 30, 2022 at 7:32 pm #7903stripedzebra1
Yes, I am using a theme override, specifically the taste theme. I followed the guide, and i changed the code in a new folder called taste-override. Problem is, when I try to update the theme in Publii, it stays on the old version. I’m not sure if this has anything to do with it, but I also modified the config.json file in the override so that i could include custom share and follow buttons, which worked.July 31, 2022 at 10:37 pm #7910kensquires
When you’re looking at the SEO section in publii (sorry I don’t have it in front of me at the moment) in which at the top of the page it shows “website title” then it shows the theme you using… Just so we’re clear on the page I want you to be on, when it shows the theme you’re using it says “Taste Ver 1” (example number) where it should say “Taste Ver 2” (the newest version for sake of this post) is this correct?
If that’s the case then click where it says “Taste Ver 1” and at the bottom of that list it should say uninstall with “Taste Ver 1” listed. Click on it, yes I want you to uninstall Taste Ver 1. Then I think automatically it would ask to resize your images it doesn’t matter if you do it or not.
So at this time under your website title where it says theme it’ll say “none”, click on the theme and choose “taste” it should be updated to ver 2 now when you install it. It will ask you if you want to resize your images automatically.. Say yes as I’m sure you would. At this point, it should bring everything forward and you shouldn’t lose anythingAugust 2, 2022 at 3:04 am #7933stripedzebra1
Yeah, I’ve already tried all of this unfortunately to no avail. Not sure what’s happening.August 2, 2022 at 10:40 am #7938Tomasz Dziuda
@stripedzebra1 – if you have edited config.json file in the theme – please make sure that you have updated it too after theme update. All overrided files should also contains all necessary changes from the updated theme to make it working properly.
Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!
- You must be logged in to reply to this topic.