in Drupal 7, you can achieve the goal of applying a different theme to anonymous users using Role Theme Switcher module. "Role Theme Switcher" allows you to set different themes for different user roles, including anonymous users.
Role Theme Switcher:
- Install and enable the "Role Theme Switcher" module.
- Go to the module's configuration page by navigating to "Configuration" > "User Interface" > "Role Theme Switcher" in your Drupal admin panel.
- Create a rule that specifies the conditions for anonymous users. For example, set the "Role" condition to "Anonymous user" and choose the theme you want to apply.
- Save your settings.
- Clear the cache.
Source code viewer
- drush dl role_theme_switcher
- drush en role_theme_switcherProgramming Language: Bash