Sign in

Updating an overriden theme

  • This topic has 7 replies, 3 voices, and was last updated 6 days, 13 hours ago by .
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #7875
    stripedzebra1

    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.

    #7877
    kensquires

    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 helped

    #7879
    stripedzebra1

    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 help

    #7893
    Tomasz 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!

    #7903
    stripedzebra1

    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.

    #7910
    kensquires

    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 anything

    #7933
    stripedzebra1

    Yeah, I’ve already tried all of this unfortunately to no avail. Not sure what’s happening.

    #7938
    Tomasz 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!

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.