This recipe details the steps involved in adding a slogan to the theme. Site slogans are a common feature on most sites and are typically witty or involve clever wordplay. They are synonymous with catchphrases, taglines, mottoes, and so on.
Drupal offers a global setting to store the site slogan which is customarily displayed by themes near the site logo or site name and is also regularly added to news feeds and site e-mails as part of the site’s identity.
Think up a good slogan! This is the biggest stumbling block to getting this recipe right.
Adding a slogan to a theme involves the following steps:
1. Navigate to
admin/config/system/site-information
[Home | Administration | System | Site information].2. Locate the Slogan textfield and add the slogan here as shown in the following screenshot:
3. Click the Save configuration button at the bottom of the page to save our changes.
4. Now, navigate to the theme administration page at
admin/appearance
[Home | Administration | Appearance].5. Click on the Settings tab at the top of the page.
The resulting page should have multiple tabs: one titled Global settings which affects all themes and others representing each enabled theme. Configuration options under the Global settings tab serve as the site’s default settings for all themes, while equivalent settings within each theme’s tab work as overrides for the global settings.
6. On the Global settings page, look for the Site slogan setting in the Toggle display section and ensure that it is checked:
Drupal saves the provided slogan as a configuration setting in the database. The theme system makes this setting available as a variable to the theme which outputs it accordingly when the page is being rendered.
In the following screenshot, we can see that the slogan is enabled and is displayed along with the logo and the name of the site: