Skip to main content

Hacking the theme

May 3, 2010 by Steve

The Newswire theme is just about exactly what I wanted when I first started drawing out my site on paper. There are just a few things that I wanted to change. Here's what I did:

  • Moved the "tags" block of links ("Drupal, theme, hack") for each node from the bottom right to the upper left. (Both CSS and PHP changes required.)
  • Changed the look for <code> sections. (CSS)
  • Changed the first post on the front page to print out full length. (PHP)

These are changes that have to happen in the files that make up the theme definition. For my site here, I'm looking in sites/all/themes/newswire. This means if you have more than one theme in use on your site, each will need to be individually modified.

The PHP changes were made to the node.tpl.php file, which governs how each node is printed out. The CSS changes were made to a couple of different files. I never would have been able to find the right place for the style changes without the Firebug plug-in for Firefox. It allows you to right-click any spot on the page and "Inspect Element", which will show you all the style elements that go into making the page look the way it does.


  • @rosamundlannin I make regular chili but use that veggie crumble meat substitute stuff. 7 years 39 weeks ago
  • @Snarky_Geek Since I was awake at 4:30 this morning, and finally just gave up and went to work around 5:45, I feel your pain. 7 years 40 weeks ago
  • One of the Chicago office dogs really wants to play this morning @the_nerdery, keeps bringing toys over to try to start something. 7 years 48 weeks ago

Premium Drupal Themes by Adaptivethemes