Currently when installing a sub-theme (not sure if this applies to a theme too) blocks from existing themes are copied to the new sub-theme in the Blocks layout section. Is there a way to prevent this from happening? I want to install a sub-theme and then manually add just the blocks I need.

1 Answer 1


They're not really "copied". They're the same blocks from your theme, but moved to the available regions of your subtheme after enabling it (iirc, they move to similarly named regions, disabled if none found).

What you could do is export the configuration. Drupal also keeps track of the active theme and block positions in the config. You could position blocks in the old theme and export the config for that. Then when you move to the new theme, you reposition the blocks and export again. Whenever you feel like switching over, you simply reimport the config you like.

I'm not so familiar with the config management in the UI, but this can be done with Git and Drush cex/cim quite easily.

  • What I want is no blocks listed on the Block layout for my new sub-theme. Look at the default Admin themes like Bartik - these don't have all the blocks from my custom theme listed.
    – codesmith
    May 18, 2017 at 18:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.