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

WordPress yoast plugin remove date or article:published_time

Yoast is an essential plugin for WordPress SEO. It is one of the best SEO plugin for wordpress right now. But, after disabling date from ...