Replacing site name text for logo image - using Earthling Two theme

Permalink
Can anyone help please? I have deleted the site name text in the Global Stack/Site Name block of the "Earthling Two" theme and replaced it with a .png logo image, but the he logo doesn't show and the text is still there even though I've deleted it - please seewww.www.fremingtoncommunity.com...

If it helps with any ideas, when I go to "Systems and settings"/site name and delete a couple of letters from the site name there, so same letters are then missing from the site name, but still no logo.

Any thoughts on how I can put a logo image in the header instead of that text?

Thanks

thebigideasman
 
joelhansen replied on at Permalink Reply
joelhansen
Hey there,

It looks like you aren't referencing the path to the image correctly. Maybe check where you have the image stored in your site. If you need to hardcode it use something like:

<img href="<?php  echo $this->getThemePath()?>/images/logo.jpg" />


... to grab an image saved within your Theme's /images folder.

However, I would personally go in and edit the Page Type of the pages you are using rather than hardcode it. There is probably something like:

<?php 
   $block = Block::getByName('My_Site_Name');  
   if( $block && $block->bID ) $block->display();   
   else echo SITE;
?>


... in your elements/header.php. That "$block = Block..." is pulling your Site Name from the C5 Dashboard. I would replace it with a general block. Then, you can just upload your Logo like a regular image in C5. Something like this:

<?php
    $a = new Area('Logo');
    $a->display($c);
?>


You might have to edit the logo's location in the CSS afterward... ;)

My first attempt to answer a forum post. Hope this helps. :)
justrj replied on at Permalink Best Answer Reply
justrj
Hi!

In the Global Stack Area, you can re-ad the Global Stack "Site Name" and then add a content block to it. Once you are in the editing pane, all you have to do is select "Add Image" from the toolbar. This will open the concrete5 file manager and allow you to choose the image file on your computer. Once you've uploaded the image to the file manager, click on the image and select "Choose".

That should put the image in your editor window. Hit "Add" to close the dialogue box and "Approve Changes" to re-add the global stack.

Now when you go back out to your site, the image should be on every page.
canvasdreams replied on at Permalink Reply
canvasdreams
Better, less verbose reply ^
:)
thebigideasman replied on at Permalink Reply
thebigideasman
Sorry, it's only taken me a year to reply lol, but thanks anyway @justrj.

Someone else has just asked me this question, so I thought I better mark this as the best answer that worked for me.

Thank again.

David