By Hanscraft on
I'm trying to find instructions on how to remove the node title for just this one page but NOT the rest of the nodes under the same content type.
I've tried adding h2.uber_title page-node-#### with a display of none. H2.uber_title is the CSS that controls the appearance of node titles on my site.
Help!
Comments
If it is only one page that
If it is only one page that you want to do, a dirty fix would be to create a node-[node-id].tpl.php and remove the title tag from that template or in the page.tpl.php identify the node id and pass the $title in a if loop and print it out when it doesn't match our node id.
Thanks!
I read in another question somewhere that the node-[nid].tpl.php method would not work and to use CSS instead.
I think we'll have just a few pages like this (the outside vendor wants to disregard our page template setup!).
I've grabbed a page.tpl.php
I've grabbed a page.tpl.php file (my particular page is also a page content type), changed the name to page-####.tpl.php. I then removed the title field. No changes!
Any other ideas? I got the page ID based upon what the node ID was when I hovered over edit in the Content management settings.
Correction
Update: Fixed It suddenly started working!
So I name the original page file to be page-node-####.tpl.php and ALL of my formatting is lost. I have made no changes to the original file other than name and it lost everything but random babbles of text from the surrounding blocks.
There is a much much more
There is a much much more simple and easy way to do this, it is called....
Exclude Node Title
Cheers
Panos
Here you can find information
Here you can find information on how to hide the title for specific nodes:
My preferred method is to do this with the theme_preprocess_page() function in the template.php file in the theme folder. This keeps te template clean from "hacky-ish" code.