Marketing Tip: Add Your Logo Before Each Headline



8 Mar 09

A Great Idea from the Thesis Forum

Browsing through the Thesis Forum recently, I came across a forum thread about a custom function before the headline hook.

The following instructions are from that forum thread, based on my usage of it at www.Bully.ws which we recently retired to spend more time on our other blogs.

Logo for Bully

If the code is not working for you, please post your request for help at this forum thread.

Adding an image to before your posts is great for branding, visual excitement and integrating your logo colours throughout your site without making it too busy.

Add an image before your headlines in Easy Steps

  1. Make an image (I use 50px x 50px) and save it to your ‘themes/thesis/images’ folder
  2. Grab hold of IrfanView – a great free program that lets you resize and change format, crop, etc.

IrfanView

  1. Copy and paste the code below – don’t forget to alter the url of the image location – into your custom functions.php and custom.css files
  2. Refresh your browser and see your creation

Add the following to your custom functions.php file

/*avatar before headline site wide*/
function author_avatar() {
echo ‘<img src=”http:/thesisthemehq.com/wp-content/themes/thesis/images/ChamEye.gif” alt=” ” class=”title-avatar” />’;
}
add_action(‘thesis_hook_before_headline’, ‘author_avatar’);

Add the following to your custom.css file

/*—:[ #avatar before header ]:—*/
.custom .title-avatar {
float:left;
margin: 0 1em 0 0;}

If you just want it to appear on your pages (when reader is only reading that article)

Add the following to your customs function.php file

/*the following puts avatar before each post on pages only*/
function author_avatar() {
if (is_page()){
}
else{ ?>
<img src=”http://bully.ws/wp-content/themes/thesis/images/bull.gif” alt=” ” class= “title-avatar” />
<?php
}}
add_action(‘thesis_hook_before_headline’, ‘author_avatar’);

And the following to your custom.css file

/*—:[ #avatar before header ]:—*/
.custom .title-avatar {
float:left;
margin: 0 1em 0 0;}

Show Off Your Site

If you are using this customisation, let us know by leaving a comment with your site url.

Here are some sites using it already.

www.bully.ws

www.bully.ws

www.redrightreturning.net

www.redrightreturning.net

www.howtomakemyblog.com

www.howtomakemyblog.com

Related Posts

  1. 5 Sneaky Ways and Means To Hack A WordPress Site
  2. Confessions of a Self Taught WordPress Hacker
  3. Thesis Theme Tutorial: Image Line Up
  4. 5 Helpful Posts For Upgrading Thesis & WordPress
  5. 8 Part Tutorial Creating a Na’vi Avatar Face in Photoshop: Angelina Jolie Example

{ 6 comments… read them below or add one }

This Eclectic Life May 11, 2009 at 4:17 am

Would you be kind enough to explain to a “newbie” how to do this with the openhook plugin?

I just installed two days ago & miss the avatar I used before my title in my old theme. Thank you!

This Eclectic Life’s latest artistic creation..St. Peter’s Catholic Church in Lindsay, Texas. My Neck Of The Woods

Reply

Imdb August 21, 2009 at 6:03 am

Thanks.
“A Great Idea from the Thesis Forum” really great)
100 Top Films
Imdb´s last blog ..Wildboyz (2003) [Adventure, Comedy, Documentary], s04e07 My ComLuv Profile

Reply

Chris Harding December 21, 2009 at 8:06 am

A big thank you for this very effective addition.
:o)

Reply

ARQUIGRAFICO January 13, 2010 at 3:38 pm

At last i find it!!! Thanks, i was looking for this trick for my blog Http://www.arquigrafico.com

I love thesis!!!!!!!!!!!!!
ARQUIGRAFICO´s last blog ..Como hacer textura de agua en una Piscina con Vray y 3dsmax My ComLuv Profile

Reply

Arquigrafico January 14, 2010 at 3:04 am

I did it, but it did not work.
I had some errors with the simbols
/*— and
”http:// ……
What could happen?
Arquigrafico´s last blog ..Los mejores programas de edicion de imagenes My ComLuv Profile

Reply

Somone Bull January 14, 2010 at 7:24 am

When you copy the code you sometimes need to paste it into a text editor and change the ‘ and ” because they change. Check the code via the custom-functions viewer in the dashboard or via the cpanel if you can and see what code ended up saving as.

Reply

Leave a Comment

Previous post:

Next post: