Hello,
today I tried all day long to disable the node title my front page but could´t reach my goal!
To do so I did as is written in many places on the web and changed (or even deleted) line 146 in the page-front.tpl.php file which reads:
if ($title) :
print $title;
endif;
But no effect at all. I also flushed all caches afte the changes, so that cannot be the problem.
When I changed (or deleted) the same content of the page.tpl.php file (line 126) I could disable the title on all other pages but not the front-page. Also changing both lines in both files would not disable the title on the front page!
For sure it´s easy and I´m only making a slight mistake but I have no more ideas what to do, so please help me... ;-)
Thanks in advance!
Comments
Comment #1
FireF CreditAttribution: FireF commentedComment #2
danpros CreditAttribution: danpros commentedHi,
Have another projects that need my attentions :)
Are you sure already deleted or change the code below? I disable the title by deleting the following code
Comment #3
FireF CreditAttribution: FireF commentedThanks for the answer but didn´t help! If I delete the mentioned line in both the pages.tpl.php and the page-front.tpl.php I can "kill" the title on every page but not the front page.
Strange thing... ;-)
Comment #4
danpros CreditAttribution: danpros commentedHi, if you want to disable the title only on frontpage then you just delete the code in page-front.tpl.php (the page-front.tpl.php is displayed in frontpage) but for page.tpl.php is displayed in regular page.
So just delete the code in page-front.tpl.php and not the page.tpl.php.
Dan,
Comment #5
FireF CreditAttribution: FireF commentedHi and again thanks for the answer!
I already understood that page-front.tpl.php is displayed on the front page, but the title on the front page keeps and keeps displaying even if I delete the code in the page-front.tpl.php!
The problem is: I can disable the title on all other pages (except front) by deleting the code in the page.tpl.php. That works fine. But deleting the same code in in the same way in the page-front.tpl.php does nothing for the front-page title!
FireF
Comment #6
danpros CreditAttribution: danpros commentedHi,
That is a strange, what do you use? if you are using the sub-theme then you must change the page-front.tpl.php for sub-theme.
Comment #7
danpros CreditAttribution: danpros commentedHi,
I'll close this. Please re-open if you need more helps.
Thanks,
Dan
Comment #8
EvolutionGP CreditAttribution: EvolutionGP commentedGreat template!
I wanted the slideshow in all my pages so I had to use the page-front.tpl.php and was experiencing the same problem with not being able to get rid of the title by deleting the above mentioned code. (it worked in the page.tpl.php just fine)
I ended up deleting line 52 :
<?php if ($site_name) : ?><h1 class="logo-name"><a href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>"><?php print $site_name; ?></a></h1><?php endif; ?>
I cant tell you why it worked and I am not finding it is having any side effects.
Comment #9
wel3kxial CreditAttribution: wel3kxial commentedjust use this in the css
.front #page-title {
display:none;
}
Comment #10
Anonymous (not verified) CreditAttribution: Anonymous commentedfinally worked
Comment #11
gpvdo CreditAttribution: gpvdo commentedNote: I had to change the above to (Drupal 7.27) :
.front .node-title {
display:none;
}
Comment #12
TryAgain y veras CreditAttribution: TryAgain y veras commented#9 worked for me in Drupal 7.34
Thanks for information guys!