示例#1
0
<?php

get_header();
$t_show_post = nattywp_get_option("t_show_post");
?>
    

<div class="narrowcolumn">
    <?php 
if (have_posts()) {
    the_post();
}
?>
     
     <h2 class="page-title author"><?php 
printf(__('
Author Archives: %s', 'silesia'), "<span class='vcard'><a class='url fn n' href='" . get_author_posts_url(get_the_author_meta('ID')) . "' title='" . esc_attr(get_the_author()) . "' rel='me'>" . get_the_author() . "</a></span>");
?>
</h2>

<?php 
// If a user has filled out their description, show a bio on their entries.
if (get_the_author_meta('description')) {
    ?>
					<div id="entry-author-info">
						<div id="author-avatar">
							<?php 
    echo get_avatar(get_the_author_meta('user_email'), apply_filters('nattywp_author_bio_avatar_size', 60));
    ?>
						</div><!-- #author-avatar -->
						<div id="author-description">
示例#2
0
        echo $t_feedburnerurl;
        ?>
"><?php 
        _e('Read in RSS', 'silesia');
        ?>
</a>
   <?php 
    }
    ?>

</li>
<?php 
    if (nattywp_get_option('t_twitterurl') != '') {
        ?>
<li class="twitter"><a href="<?php 
        $t_twitterurl = nattywp_get_option('t_twitterurl');
        if ($t_twitterurl == 'no') {
            $t_twitterurl = 'http://twitter.com/nattywp';
        }
        echo $t_twitterurl;
        ?>
" title="<?php 
        _e('Twitter profile', 'silesia');
        ?>
"><?php 
        _e('Twitter', 'silesia');
        ?>
</a></li>
<?php 
    }
    wp_meta();
示例#3
0
function silesia_breadcrumbs()
{
    $delimiter = '&raquo;';
    // delimiter between crumbs
    $showCurrent = 1;
    // 1 - show current post/page title in breadcrumbs, 0 - don't show
    $before = '<span class="current">';
    // tag before the current crumb
    $after = '</span>';
    // tag after the current crumb
    global $post;
    $homeLink = home_url();
    if (nattywp_get_option('t_home_name') == 'no') {
        $homeName = 'Home';
    } else {
        $homeName = nattywp_get_option('t_home_name');
    }
    $output = '<ul id="crumbs">';
    if (is_home() || is_front_page()) {
        $output .= '<li class="first"><a href="' . $homeLink . '" id="home-img"></a></li>';
        $output .= '<li>' . $homeName . '</li>';
    } else {
        $output .= '<li class="first"><a href="' . $homeLink . '" id="home-img"></a></li>';
        if (is_category()) {
            global $wp_query;
            $cat_obj = $wp_query->get_queried_object();
            $thisCat = $cat_obj->term_id;
            $thisCat = get_category($thisCat);
            $parentCat = get_category($thisCat->parent);
            if ($thisCat->parent != 0) {
                $output .= '<li>' . get_category_parents($parentCat, TRUE, ' &raquo; ') . '</li>';
            }
            $output .= '<li>' . __('Archive by category', 'silesia') . ' "' . single_cat_title('', false) . '"' . '</li>';
        } elseif (is_day()) {
            $output .= '<li><a href="' . get_year_link(get_the_time('Y')) . '">' . get_the_time('Y') . '</a></li>';
            $output .= '<li><a href="' . get_month_link(get_the_time('Y'), get_the_time('m')) . '">' . get_the_time('F') . '</a></li>';
            $output .= '<li>' . get_the_time('d') . '</li>';
        } elseif (is_month()) {
            $output .= '<li><a href="' . get_year_link(get_the_time('Y')) . '">' . get_the_time('Y') . '</a></li>';
            $output .= '<li>' . get_the_time('F') . '</li>';
        } elseif (is_year()) {
            $output .= '<li>' . get_the_time('Y') . '</li>';
        } elseif (is_single() && !is_attachment()) {
            if (get_post_type() != 'post') {
                $post_type = get_post_type_object(get_post_type());
                $slug = $post_type->rewrite;
                $output .= '<li><a href="' . $homeLink . '/' . $slug['slug'] . '/">' . $post_type->labels->singular_name . '</a></li>';
                $output .= '<li>' . get_the_title() . '</li>';
            } else {
                $cat = get_the_category();
                $cat = $cat[0];
                $output .= '<li>' . get_category_parents($cat, TRUE, ' &raquo; ') . '</li>';
                $output .= '<li>' . get_the_title() . '</li>';
            }
        } elseif (!is_single() && !is_page() && get_post_type() != 'post' && !is_404()) {
            $post_type = get_post_type_object(get_post_type());
            if (isset($post_type->labels)) {
                $output .= '<li>' . $post_type->labels->singular_name . '</li>';
            } else {
                $output .= '<li>' . __('Nothing to display', 'silesia') . '</li>';
            }
        } elseif (is_attachment()) {
            $parent = get_post($post->post_parent);
            $cat = get_the_category($parent->ID);
            $cat = $cat[0];
            $output .= '<li>' . get_category_parents($cat, TRUE, ' &raquo; ') . '</li>';
            $output .= '<li><a href="' . get_permalink($parent) . '">' . $parent->post_title . '</a></li>';
            $output .= '<li>' . get_the_title() . '</li>';
        } elseif (is_page() && !$post->post_parent) {
            $output .= '<li>' . get_the_title() . '</li>';
        } elseif (is_page() && $post->post_parent) {
            $parent_id = $post->post_parent;
            $breadcrumbs = array();
            while ($parent_id) {
                $page = get_page($parent_id);
                $breadcrumbs[] = '<li><a href="' . get_permalink($page->ID) . '">' . get_the_title($page->ID) . '</a></li>';
                $parent_id = $page->post_parent;
            }
            $breadcrumbs = array_reverse($breadcrumbs);
            foreach ($breadcrumbs as $crumb) {
                $output .= $crumb;
            }
            $output .= '<li>' . get_the_title() . '</li>';
        } elseif (is_search()) {
            $output .= '<li>' . __('Search results for', 'silesia') . ' "' . get_search_query() . '"</li>';
        } elseif (is_tag()) {
            $output .= '<li>' . __('Posts tagged', 'silesia') . ' "' . single_tag_title('', false) . '"</li>';
        } elseif (is_author()) {
            global $author;
            $userdata = get_userdata($author);
            $output .= '<li>' . __('Articles posted by', 'silesia') . ' ' . $userdata->display_name . '</li>';
        } elseif (is_404()) {
            $output .= '<li>' . __('Error 404', 'silesia') . '</li>';
        }
        if (get_query_var('paged')) {
            if (is_category() || is_day() || is_month() || is_year() || is_search() || is_tag() || is_author()) {
                $output .= ' (';
            }
            $output .= __('Page', 'silesia') . ' ' . get_query_var('paged');
            if (is_category() || is_day() || is_month() || is_year() || is_search() || is_tag() || is_author()) {
                $output .= ')';
            }
        }
    }
    $output .= '</ul>';
    echo $output;
}
function nattywp_show_cat($before = '', $after = '', $desc = false)
{
    $exclude = nattywp_get_option('t_exclude_cats');
    if ($exclude == 'no' || $exclude[0] == 'no' || $exclude[0] == '') {
        $exclude = '';
    } else {
        if (is_array($exclude)) {
            $exclude = join(',', $exclude);
        }
    }
    if ($desc == false) {
        $categories = wp_list_categories('sort_column=menu_order&depth=3&echo=0&title_li=&exclude=' . $exclude);
        $categories = preg_replace('%<a ([^>]+)>%U', '<a $1><span>', $categories);
        $categories = str_replace('</a>', '</span></a>', $categories);
    } else {
        $getcats = get_categories('hierarchical=0&hide_empty=1');
        foreach ($getcats as $thecat) {
            $categories .= '<li><a href="' . get_category_link($thecat->term_id) . '" title="' . sprintf(__("View all posts under %s", 'silesia'), $thecat->name) . '"><span>' . $thecat->name . '</span>';
            $categories .= !empty($thecat->description) ? '<span class="desc">' . $thecat->description . '</span>' : '';
            $categories .= '</a></li>';
        }
    }
    echo $before . $categories . $after;
}
示例#5
0
}
?>
     
    </ul>
  </div>
  <a id="control" href="#">+</a>
</div>

<div id="main-wrapper">
<div id="header">
  <div class="wrapper">
    <div class="triangle"></div>
    <div class="logo-block">
    <div class="logo">
    <?php 
if (nattywp_get_option("nattywp_custom_logo") == '') {
    echo '<ul><li><a class="logo-title shadowed" href="' . home_url() . '" rel="home" title="' . esc_attr(get_bloginfo('name', 'display')) . '">' . get_bloginfo('name', 'display') . '</a></li></ul>';
} else {
    ?>
        
       <a href="<?php 
    echo home_url();
    ?>
"><?php 
    nattywp_get_logo('', '', 'px.gif', false);
    ?>
</a>
    <?php 
}
?>