I just installed the Pixel Theme ( http://drupal.org/project/pixel ) I would like to find out how to add a custom logo.

Thanks

Comments

pddrupal’s picture

Upload your own logo in .png format to your theme directory (/sites/default/themes/mytheme).

Check that logo is enabled in your theme settings at /admin/build/themes

markconroy’s picture

logo is not supported in the pixel theme. You'll have to put it into your page.tpl.php file and also your style.css file as far as I know.

============

Drupal Core Maintainer for "Out of the Box" Initiative.

perspectoff’s picture

Let's say I have a 55 x 55 pixel logo (the size that seems to work best with the Pixel theme) in my files folder named Logo55px.jpg.

For my server, it happens to be found at sites/myserver.mydomain.org/files/Logo55px.jpg , for example.

What I found I had to do was to edit the page.tpl.php file in the Pixel themes folder (on my server at sites/myserver.mydomain.org/themes/pixel/page.tpl.php , for example).

I changed the section that reads

   <div id="logo">
      <h1><a href="<?php print $front_page; ?>"><?php print $site_name; ?></a></h1>
      <span><?php print $site_slogan; ?></span>
    </div>

so that it includes the URl of the logo in it, i.e.

      <?php print '<a id="logo-uri" href="' . base_path() . '" title="' . $site_name . '"><img id="logo-img" src="http://myserver.mydomain.org/sites/myserver.mydomain.org/files/Logo55px.jpg" /></a>';  ?>

so that it now reads

     <div id="logo">
      <h1><a href="<?php print $front_page; ?>">
      <?php print '<a id="logo-uri" href="' . base_path() . '" title="' . $site_name . '"><img id="logo-img" src="http://myserver.mydomain.org/sites/myserver.mydomain.org/files/Logo55px.jpg" /></a>';  ?>
      <?php print $site_name; ?></a></h1>
      <span><?php print $site_slogan; ?></span>
    </div>

There probably is a more robust and/or elegant way, but this gets the job done for me. Also it is probably sufficient to use

src="sites/myserver.mydomain.org/files/Logo55px.jpg"

instead of

src="http://myserver.mydomain.org/sites/myserver.mydomain.org/files/Logo55px.jpg"