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.

@stevew99999

  • @breathingdakota Ever tried. Ever failed. No matter. Try again. Fail again. Fail better. 5 years 38 weeks ago
  • Beer o'clock @the_nerdery, having some wings and getting set for #btlcap. Yes, #ilovemyjob. 5 years 38 weeks ago
  • @zacknaylor And I want to publish them. Let me know if you need help with that part. 5 years 38 weeks ago

Premium Drupal Themes by Adaptivethemes