How To Add Logo In Thesis Theme Header

Artikel Ini Ke :

How To Add Logo In Thesis Theme Header - Zulsyiddin has just released a new version of Thesis Theme, there are new features being added and some excited. But still the same basis. This theme has been designed in such a way that is very flexible and easy customization.

In this post, I'll show you how to add a logo in the header Thesis Theme. By default, the Thesis Theme is featuring a blog title and tagline in the header. It's a bit ugly and you can make changes to your blog for to stand out from the crowd.

Here are the 3 steps you can easily follow.

#1: Open custom_functions.php

Open custom_functions.php file using any text editor of your choice. The file is located at thesiscustom folder. This file is purposely for you to customize Thesis Theme without touching the core file.

#2 Adding Header Action Hook

Add the following line of code just below in the file. It is adding a hook function custom_image_header to the thesis_hook_header section.
add_action('thesis_hook_header', 'custom_image_header');

#3 Creating Header Function

This is the most important step, creating customized header function. The following code should be added to the custom_functions.php file just below add_action code shown in step 2.

function custom_image_header() {
?>
    <p id="logo"><a href="<?php bloginfo('url'); ?>"><img src="<?php echo '' . get_option('upload_url_path') . '/bh-logo.png'; ?>" alt="<?php bloginfo('name'); ?>" title="<?php bloginfo('name'); ?>"/></a></p>
<?php
}

<p id="logo">
It tells you that this paragraph is logo, which is defined in css.
<a href="<?php bloginfo('url'); ?>"> This is the make the logo header as clickable link.

<img src="<?php echo '' . get_option('upload_url_path') . '/bh-logo.png'; ?>" alt="<?php bloginfo('name'); ?>" title="<?php bloginfo('name'); ?>"/> This code is responsible for the displaying of header logo. You can change bh-logo.png to the correct logo filename that is uploaded to your uploads folder.

Finally you can see the result in the image file below or you can scroll up to the top and take a look at my header section.
Conclusion

Same as the footer customization and attribution link removal, header customization made easy with the use of hooks. You can refer to Thesis user guide for more information about theme customization using hooks. Enjoy!

By entering your email address below, then you will be able to post the latest articles from u'r refresh the mind in your inbox:

Delivered by FeedBurner

0 komentar:

Blogspot Tips And Tricks © 2011 Template by:
SkinCorner