Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By karnerblue on
Hello-
I'm developing a new Drupal theme, and I want my site slogan to show up only on the front page. I'm using a lot of large fonts, since that seems to be pretty hip right now. It's a bit overbearing to have a huge slogan show up on every page though.
Can I get my slogan to show up only on certain pages? Or maybe someone has a suggestion for how to do it without using the actual "slogan" (maybe a block or something?)
Thanks so much!
Comments
you basically answered your
you basically answered your own question. probably the easiest thing to do is turn off the theme's slogan and create a custom block that you can then place selectively on pages like any other block.
===
"Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime." -- Lao Tzu
"God helps those who help themselves." -- Benjamin Franklin
"Search is your best friend." -- Worldfallz
You can use $is_front, which
You can use $is_front, which will return true if the condition is met, i.e you're on the front page.
For example in page.tpl.php
This tests to see if you are indeed on the front page and if a site slogan is set, if both are true, it prints the $site_slogan. Change the html to suit (I used
<em>
tags).Drupal themes
Pimp your Drupal 8 Toolbar - make it badass.
Adaptivetheme - theming system for people who don't code.
I know its a old thread but
I know its a old thread but one might also consider override in template.php file
if you only want slogan on the front page
------
GiorgosK
Web Development