File: /hosting/kak.bg/web/wp-content/themes/Primero/author.php
<?php
get_header(); ?>
<?php if (function_exists('progression_breadcrumbs')) progression_breadcrumbs(); ?>
<div class="content-container">
<div class="<?php if(of_get_option('blog_sidebar', 'yes') == 'yes'): ?>sidebar-container<?php else: ?>content-container<?php endif; ?> container-<?php echo of_get_option('sidebar', 'right'); ?>">
<div class="page-content <?php if(of_get_option('blog_sidebar', 'yes') == 'yes'): ?>content-sidebar<?php if(of_get_option('sidebar', 'right') != 'right') echo '-'.of_get_option('sidebar', 'right'); //if statement needed to avoid css layout issues ?><?php endif; ?>">
<?php
if($post->post_parent) {
$children = wp_list_pages('sort_column=menu_order&title_li=&child_of=' . $post->post_parent . '&depth=1&echo=0');
}
else {
$children = wp_list_pages('sort_column=menu_order&title_li=&child_of=' . $post->ID . '&depth=1&echo=0');
}
if ($children) { ?>
<ul class="sub-pagination">
<?php if($post->post_parent): ?>
<li><a href='<?php echo get_permalink($post->post_parent); ?>'><?php echo get_the_title($post->post_parent); ?></a></li>
<?php else: ?>
<li class="current_page_item"><a href='<?php echo get_permalink($post->ID); ?>'><?php echo get_the_title($post->ID); ?></a></li>
<?php endif; ?>
<?php echo $children; ?>
</ul>
<?php } else { ?>
<?php } ?>
<?php if ( have_posts() ) : ?>
<?php
/* Queue the first post, that way we know
* what author we're dealing with (if that is the case).
*
* We reset this later so we can run the loop
* properly with a call to rewind_posts().
*/
the_post();
?>
<h1 class="page-title"><?php printf( __( 'Author Archives: %s', 'progressionstudios' ), '<span class="vcard"><a class="url fn n" href="' . esc_url( get_author_posts_url( get_the_author_meta( "ID" ) ) ) . '" title="' . esc_attr( get_the_author() ) . '" rel="me">' . get_the_author() . '</a></span>' ); ?></h1>
<?php endif; ?>
<?php
/* Since we called the_post() above, we need to
* rewind the loop back to the beginning that way
* we can run the loop properly, in full.
*/
rewind_posts();
/* Run the loop for the author archive page to output the authors posts
* If you want to overload this in a child theme then include a file
* called loop-author.php and that will be used instead.
*/
get_template_part( 'loop', 'author' );
?>
<?php while(have_posts()): the_post(); ?>
<div class="blog-post">
<h2 class="blog-title"><a href="<?php echo the_permalink(); ?>"><?php the_title(); ?></a></h2>
<?php if(of_get_option('blog_sidebar', 'yes') == 'yes'): ?>
<?php
if(get_post_meta($post->ID, 'pyre_video_embed_link', true)):
?>
<div class="blog-featured-image">
<?php
$values = get_post_custom_values('pyre_video_embed_link');
$pattern = "/height=\"[0-9]*\"/";
$values = preg_replace($pattern, "height='354'", $values);
$pattern = "/width=\"[0-9]*\"/";
$values = preg_replace($pattern, "width='630'", $values);
$shortcode_output = do_shortcode($values[0]);
print $shortcode_output;
?>
</div>
<?php
elseif(has_post_thumbnail()):
$thumbnail_2 = wp_get_attachment_image_src ( get_post_thumbnail_id($post->ID),'blog-image');
?>
<div class="blog-featured-image"><a href="<?php the_permalink(); ?>"><img src="<?php echo $thumbnail_2[0]; ?>" /></a></div>
<?php
endif;
?>
<?php endif; ?>
<?php if(of_get_option('blog_sidebar', 'no') == 'no'): ?>
<?php
if(get_post_meta($post->ID, 'pyre_video_embed_link', true)):
?>
<div class="blog-featured-image">
<?php
$values = get_post_custom_values('pyre_video_embed_link');
$pattern = "/height=\"[0-9]*\"/";
$values = preg_replace($pattern, "height='354'", $values);
$pattern = "/width=\"[0-9]*\"/";
$values = preg_replace($pattern, "width='900'", $values);
$shortcode_output = do_shortcode($values[0]);
print $shortcode_output;
?>
</div>
<?php
elseif(has_post_thumbnail()):
$thumbnail_2 = wp_get_attachment_image_src ( get_post_thumbnail_id($post->ID),'portfolio-one');
?>
<div class="blog-featured-image"><a href="<?php the_permalink(); ?>"><img src="<?php echo $thumbnail_2[0]; ?>" /></a></div>
<?php
endif;
?>
<?php endif; ?>
<div class="blog-details"><?php _e('by','progressionstudios'); ?> <?php the_author(); ?> <?php _e('on','progressionstudios'); ?> <?php the_time('F d, Y'); ?> <?php _e('in','progressionstudios'); ?> <?php the_category(', '); ?> <?php _e('with','progressionstudios'); ?> <?php comments_popup_link( 'No Comments', 'One Comment', '% Comments' ); ?></div>
<?php the_content('',FALSE,''); ?>
<?php if(has_more()) { ?>
<p><a href="<?php the_permalink();?>" class="button"><?php echo of_get_option('blog_button', 'Read more ›'); ?></a></p>
<?php } ?>
<hr>
<p class="blog-tags">
<?php the_tags("<strong>Tags</strong>: ", ', ', '<br />'); ?>
</p><!-- close .portfolio-tags -->
<div class="social-networking-portfolio">
<?php if(of_get_option('googeplus_icon', 'yes') == 'yes'): ?>
<div class="google-plus">
<!-- Place this tag where you want the +1 button to render -->
<g:plusone size="medium" href="<?php the_permalink(); ?>"></g:plusone>
<!-- Place this render call where appropriate -->
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</div>
<?php endif; ?>
<?php if(of_get_option('twitter_icon_button', 'yes') == 'yes'): ?>
<div class="twitter-button"><a href="https://twitter.com/share" data-url="<?php the_permalink(); ?>" data-text="Check out this site" class="twitter-share-button" target="_blank">Share on Twitter</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div>
<?php endif; ?>
<?php if(of_get_option('facebook_icon_button', 'yes') == 'yes'): ?>
<div><a name="fb_share" type="button_count" share_url="<?php the_permalink(); ?>" target="_blank">Share</a><script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script></div>
<?php endif; ?>
<?php if(of_get_option('facebook_like_button', 'yes') == 'yes'): ?>
<div><iframe src="http://www.facebook.com/plugins/like.php?href=<?php the_permalink(); ?>&layout=button_count&show_faces=true&width=90&action=like&colorscheme=light&height=23" scrolling="no" allowtransparency="true" frameborder="0" style="border:none; overflow:hidden; width:85px; height:23px; background:transparent; margin-right:-15px;"></iframe></div>
<?php endif; ?>
</div><!-- close .social-networking-portfolio -->
<div class="clearfix"></div>
<hr>
</div><!-- close .blog-post -->
<?php
endwhile;
?>
</div><!-- close .page-content -->
<?php if(of_get_option('blog_sidebar', 'yes') == 'yes'): ?>
<?php get_sidebar(); ?>
<?php endif; ?>
<div class="clearfix"></div>
</div><!-- close .sidebar-container -->
</div><!-- close .content-container -->
<div class="content-container-base-pagination">
<div class="left-pagination"><?php
//get the current page number in $paged
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$totalPages = $wp_query->max_num_pages;
if($totalPages>1):
?>
<?php _e('Page','progressionstudios'); ?> <?php echo $paged; ?> <?php _e('of','progressionstudios'); ?> <?php echo $totalPages; ?>
<?php endif; ?>
</div>
<div class="right-pagination"></div>
<div class="center-pagination"><?php kriesi_pagination($pages = '', $range = 2); ?> </div>
<!--div class="center-pagination"><a href="#" class="selected">1</a><a href="#">2</a><a href="#">3</a><a href="#">Next ›</a></div-->
<div class="clearfix"></div>
</div><!-- close .content-container-base or .content-container-base-pagination -->
<?php get_footer(); ?>