Tuesday, August 14, 2012

Thesis Themes Customization: 9 | Add Breadcrumbs or Blog Location

I will use 1.8 Developer version of Thesis Theme

LogIn to your Dashboard and Go to Thesis > Custom File Editor
Thesis Themes Customization, Thesis Themes add category Nav menu after Header, DIY thesis theme place category Nav menu after Header, add category Nav menu after Header in thesis theme 
Select custom_functions.php form drop down menu and Click Edit Selected File.

Place this code below custom_functions.php :
function the_breadcrumbs() {
    if (!is_home()) {
        echo 'You are here: <a href="';
        echo get_option('home');
        echo '">';
        echo 'Home';
        echo "</a> /";
        if (is_category() || is_single()) {
            the_category(', ','&title_li=');
            if (is_single()) {
                echo " /";
                the_title();
            }
        } elseif (is_page()) {
            echo the_title();
}}}
function show_breadcrumbs() { ?>
<div id="breadcrumbs">
    <?php the_breadcrumbs(); ?>
</div>
<?php }
add_action('thesis_hook_before_content','show_breadcrumbs');
 Select custom.css file and place this code below it:
#breadcrumbs {
    background: #535637;
    padding: 10px;
    border-bottom-left-radius: 18px;
    border-top-right-radius: 18px;
    font-size: 14px;
    font-family: Arial, Helvetica, sans-serif, SolaimanLipi;
    color: #fff;
}
#breadcrumbs a {
    color: #CCC;
    font-weight: bold;
}
#breadcrumbs a:hover {
    text-decoration: none;
}
 Now save it.
[Please comment for any Problem]

No comments:

Post a Comment

!! COMMENT HERE FOR ANY PROBLEM !!

Featured post

Open Facebook post or notification in side Tab

Do you know that recently facebook added a new way of reading notifications or post activity? I am using this feature frequently nowadays. W...