Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php get_header(); ?>
- <!-- BEGIN MAIN -->
- <div id="main">
- <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
- <div class="post-heading">
- <h1><?php the_title(); ?></h1>
- <span class="heading-author"><?php the_author_posts_link(); ?></span>
- <span class="heading-date">Publicado <?php echo human_time_diff(get_the_time('U'), current_time('timestamp')) . ' atrás'; ?></span>
- <span class="heading-comments"><?php comments_popup_link(__('Seja o primeiro a comentar »','IziThemes'), __('1 Commentário »','IziThemes'), '% '.__('Comentários »','IziThemes')); ?></span>
- <?php edit_post_link(__('Editar','IziThemes'),' | <span>','</span>'); ?>
- </div>
- <?php if(has_post_thumbnail() & get_post_meta($post->ID, 'izi_featured_image', true)!='disable'): ?>
- <div class="post-thumb">
- <?php $fullImage = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'full'); ?>
- <?php $image = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'thumb-large'); ?>
- <a rel="prettyPhoto">' title="<?php the_title_attribute(); ?>"><img src="<?php echo $image[0]; ?>" alt="<?php the_title_attribute(); ?>" width='612' height='300' /></a>
- </div>
- <?php endif; ?>
- <div class="post-entry">
- <?php the_content(); ?>
- <?php wp_link_pages(); ?>
- <div class='clear'></div>
- </div>
- <?php if(
- $options['twitter'] == 'On' ||
- $options['facebook'] == 'On' ||
- $options['digg'] == 'On' ||
- $options['stumbleupon'] == 'On' ||
- $options['reddit'] == 'On' ||
- $options['tumblr'] == 'On' ||
- $options['email'] == 'On' ||
- $options['google'] == 'On'
- ): ?>
- <div class='post-share'>
- <?php if($options['twitter'] == 'On'): ?>
- <div class='twitter-share share-widget'>
- <a href="http://twitter.com/share">' data-count="vertical">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
- </div>
- <?php endif; ?>
- <?php if($options['facebook'] == 'On'): ?>
- <div class='facebook-share share-widget'>
- <iframe src="http://www.facebook.com/plugins/like.php?app_id=149766198425277&href=<?php echo urlencode(get_permalink($post->ID)); ?>&send=false&layout=box_count&width=450&show_faces=false&action=like&colorscheme=light&font&height=90" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:50px; height:60px;" allowTransparency="true"></iframe>
- </div>
- <?php endif; ?>
- <?php if($options['digg'] == 'On'): ?>
- <div class='digg-share share-widget'>
- <script type="text/javascript">
- (function() {
- var s = document.createElement('SCRIPT'), s1 = document.getElementsByTagName('SCRIPT')[0];
- s.type = 'text/javascript';
- s.async = true;
- s.src = 'http://widgets.digg.com/buttons.js';
- s1.parentNode.insertBefore(s, s1);
- })();
- </script>
- <a>ID)); ?>&title=<?php echo urlencode(get_the_title()); ?>"></a>
- </div>
- <?php endif; ?>
- <?php if($options['stumbleupon'] == 'On'): ?>
- <div class='stumbleupon-share share-widget'>
- <script src="http://www.stumbleupon.com/hostedbadge.php?s=5"></script>
- </div>
- <?php endif; ?>
- <?php if($options['reddit'] == 'On'): ?>
- <div class='reddit-share share-widget'>
- <script type="text/javascript" src="http://www.reddit.com/static/button/button2.js"></script>
- </div>
- <?php endif; ?>
- <?php if($options['tumblr'] == 'On'): ?>
- <div class='tumblr-share share-widget'>
- <a href="http://www.tumblr.com/share" title="Share on Tumblr">Share on Tumblr</a>
- </div>
- <?php endif; ?>
- <?php if($options['email'] == 'On'): ?>
- <div class='email-share share-widget'>
- <a>&body=<?php the_permalink(); ?>"><img src='<?php bloginfo('template_directory'); ?>/images/email-share.png' alt='Email Share' /></a>
- </div>
- <?php endif; ?>
- <?php if($options['google'] == 'On'): ?>
- <div class='google-share share-widget'>
- <script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
- <g:plusone size="tall"></g:plusone>
- </div>
- <?php endif; ?>
- </div>
- <?php endif; ?>
- <div class="post-meta">
- <?php if($options['tags'] == 'On'): ?>
- <div class="post-meta-tags"><?php the_tags('<strong>' . __("TAGS", 'IziThemes') . '</strong> <span class="meta-arrow">»</span> ',', '); ?></div>
- <?php endif; ?>
- <?php if($options['categories'] == 'On'): ?>
- <div class="post-meta-cats"><strong><?php _e('POSTED IN', 'IziThemes'); ?></strong> <span class="meta-arrow">»</span> <?php the_category(', ') ?></div>
- <?php endif; ?>
- </div>
- <?php if($options['author'] == 'On'): ?>
- <div class="post-author">
- <?php echo get_avatar(get_the_author_meta('email'), '70'); ?>
- <h5><em><?php _e('Sobre o autor', 'IziThemes'); ?></em> <small><?php _e('Leia outros textos de'); ?> <?php the_author_posts_link(); ?></small></h5>
- <div class="author-descrip"><?php the_author_meta("description"); ?></div>
- <?php if(get_the_author_meta('twitter') || get_the_author_meta('facebook')): ?>
- <p>
- <?php if(get_the_author_meta('twitter')): ?>
- <a>'>Twitter</a>
- <?php endif; ?>
- <?php if(get_the_author_meta('twitter') || get_the_author_meta('facebook')): ?>
- -
- <?php endif; ?>
- <?php if(get_the_author_meta('facebook')): ?>
- <a>'>Facebook</a>
- <?php endif; ?>
- </p>
- <?php endif; ?>
- </div>
- <?php endif; ?>
- <?php
- if($options['related'] == 'On' ){
- $this_post = $post->ID; // get ID of current post
- $category = get_the_category($this_post); //get first current category ID
- $posts = get_posts('exclude='.$this_post.'&numberposts=4&orderby=rand&category=' . $category[0]->cat_ID . '');
- if($posts){ ?>
- <div class='homepage-widget'>
- <div class="block full">
- <h3><?php _e('Leia também','IziThemes');?></h3>
- <?php
- $endRow = 0;
- $columns = 2; // number of columns
- $hloopRow1 = 0; // first row flag
- $count = 1;
- ?>
- <div class="related-posts">
- <div class="row">
- <?php foreach($posts as $post) {?>
- <?php if($endRow == 0 && $hloopRow1++ != 0) echo " <div class=\"row\">"; //?>
- <div class="related-item<?php if($count%$columns==0) echo ' last';?>">
- <?php if(has_post_thumbnail()): ?>
- <?php $image = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'thumb-small'); ?>
- <a>' title='<?php the_title_attribute(); ?>'><img src="<?php echo $image[0]; ?>" alt="<?php the_title_attribute(); ?>" width='60' height='60' /></a>
- <?php else: ?>
- <a>' title='<?php the_title_attribute(); ?>'><img src="<?php bloginfo('template_directory'); ?>/images/thumb-small.png" alt="<?php the_title_attribute(); ?>" width='60' height='60' /></a>
- <?php endif; ?>
- <h4><a>' title='<?php the_title_attribute(); ?>'><?php the_title(); ?></a></h4>
- <span class="block-meta"><?php the_time('F j, Y'); ?></span>
- <p><?php echo text_trim(get_the_excerpt(get_permalink($post->ID)),25,'...'); ?></p>
- </div>
- <?php
- $endRow++;
- if($endRow >= $columns) { ?>
- <div class="clear"></div></div>
- <?php
- $endRow = 0;
- } //end if
- $count++;
- ?>
- <?php };// end foreach ?>
- <?php
- if($endRow != 0) {
- while ($endRow < $columns) {
- if($endRow==($columns-1)) echo('<div class="related-item last"> </div>');
- else echo('<div class="related-item"> </div>');
- $endRow++;
- }
- echo("<div class=\"clear\"></div></div>");
- }?>
- </div><!-- .related-posts -->
- </div>
- </div>
- <?php
- }
- }
- ?>
- <?php wp_reset_query(); ?>
- <div id="comments">
- <?php comments_template(); ?>
- </div>
- <?php endwhile; endif; ?>
- </div>
- <!-- END MAIN -->
- <?php get_sidebar(); ?>
- <?php get_footer(); ?>>
Add Comment
Please, Sign In to add comment