I use Justin Tadlock’s Hybrid theme framework often. It’s clean, SEO friendly and easy to customize through child themes. Child themes are custom theme files built on the hybrid framework. Hybrid is based on php hooks, so most of the modifications need to be done through hooks.
A clickable logo is something that almost every business website needs. Here is a quick and easy function to add a clickable logo to your header div.
Make sure you are working in your child theme files.
Open functions.php in your child theme folder. If you do not have a functions.php, create one.
Add the code between the backticks (`):
`
< ? php (remove spaces)
/* clickable logo header ///////////////////////////////////// */
function clickable_logo() {
?>
<a href=”http://thewebshoppe.net”><img src=”http://locationOfYourImage.com/logo.png” width=”554px” height=”83px” /></a>
< ? php (remove spaces)
}
add_action ('hybrid_header', 'clickable_logo');
?>
`
The comment line has to go after the opening php tag. If it is outside the tag, it will write above the opening html tag and throw IE7/8 into quirks mode. All sorts of ugly will happen. The first php names the function clickable_logo.
Use standard html to add the logo. Make sure you replace the above values with your own.
The final php action hook will put the logo into the header.
May 31, 2010
I am learning Drupal finally.
As a person who learns by doing, I have three separate Drupal installs going at once and I expect to have two working websites out of the deal within a month.
Don’t worry, I’ll keep you updated.
I am using Drupal 6.16.
First thing I ran into is the register_globals is enabled issue. To correct this, you need to add a line of code to the php.ini file. You might not have one of those. You can create one if you are feeling especially creative. I tried. It broke my site. I am using Hostgator hosting which I highly recommend [affiliate link]. To get a php.ini file that works, just hop onto the Hostgator chat and request one.
Once you have that php.ini file, just add this to the end of the php.ini file:
php_flag register_globals 0
I usually use Coda for code editing. I know there are better apps out there for this, but I really like the ftp editing abilities. I save, the file is uploaded and done. No download and change, upload, etc. It’s easy and I like it.
The point is, you can’t use Coda for this. You have to log in to the cpanel and select FILE MANAGER. Select the newly added php.ini and edit.
Add that one line of code to the end and save. Problem solved.
Note: this works for Hostgator hosting. If you are on another web host there are other options available. Here are a few: http://drupal.org/node/216882