Search code examples
drupalyamlthemesdrupal-9

Drupal 9 adding a custom theme not showing at Appearance


So I am trying to add a custom theme to a new Drupal 9 site, but the theme is not showing in my Appearance tab at all. I followed few fixes and tutorials but with no luck at all. Not sure what to do at this point. I am very very new to Drupal and very very lost.

This is what i did:

enter image description here

Aside of that there is no error messages or anything


Solution

  • Please swap the dashes with underscores (test_theme) in your theme directory and info YAML file.

    As per the documentation on Name your theme, stating:

    There are some important rules to follow when selecting a machine name:

    • It must start with a letter.
    • It must contain only lower-case letters, numbers and underscores.
    • It must not contain any spaces.
    • It must not be longer than 50 characters.
    • It must be unique. Your theme should not have the same short name as any other module, theme, theme engine, or installation profile you will be using on the site.
    • It should not be any of the reserved terms (folders in the Drupal distribution): src, lib, vendor, assets, css, files, images, js, misc, templates, includes, fixtures, drupal.