Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php get_header(); ?>
- <div id="content" class="col-full">
- <div id="main" class="col-left">
- <?php if ( function_exists( "yoast_breadcrumb" )) { yoast_breadcrumb('<div id="breadcrumb"><p>','</p></div>'); } ?>
- <?php if (have_posts()) : $count = 0; ?>
- <?php while (have_posts()) : the_post(); $count++; ?>
- <div class="post">
- <h1 class="title"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h1>
- <p class="date">
- <span class="day"><?php the_time('j'); ?></span>
- <span class="month"><?php the_time('M'); ?></span>
- </p>
- <div class="entry">
- <?php the_content(); ?>
- </div>
- <div id="vk_like"></div>
- <script type="text/javascript">
- VK.Widgets.Like("vk_like", {type: "full", height: 24});
- </script>
- <br /><br />
- <?php
- $original_post = $post;
- $tags = wp_get_post_tags($post->ID);
- if ($tags) {
- echo '<h4>Другие записи</h4>';
- $first_tag = $tags[0]->term_id;
- $args=array(
- 'tag__in' => array($first_tag),
- 'post__not_in' => array($post->ID),
- 'showposts'=>4,
- 'caller_get_posts'=>1
- );
- $my_query = new WP_Query($args);
- if( $my_query->have_posts() ) {
- echo "<ul>";
- while ($my_query->have_posts()) : $my_query->the_post(); ?>
- <li><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></li>
- <?php endwhile;
- echo "</ul>";
- }
- }
- $post = $original_post;
- wp_reset_query();
- ?>
- <div class="post-meta">
- <ul>
- <li class="categories">
- <span class="head"><?php _e('Категория', 'woothemes') ?></span>
- <span class="body"><?php the_category(', ') ?></span>
- </li>
- <li class="author">
- <span class="head"><?php _e('Автор', 'woothemes') ?></span>
- <span class="body"><?php the_author_posts_link(); ?></span>
- </li>
- </ul>
- <div class="fix"></div>
- </div><!-- /.post-meta -->
- </div><!-- /.post -->
- <div class="vkcom">
- <div id="vk_comments"></div>
- <script type="text/javascript">
- VK.Widgets.Comments("vk_comments", {limit: 20, width: "520", attach: "*"});
- </script>
- <?php endwhile; else: ?>
- <div class="post">
- <p><?php _e('Мы очень очень старались, но ничего не нашли.', 'woothemes') ?></p>
- </div><!-- /.post -->
- <?php endif; ?>
- </div><!-- /#main -->
- </div>
- <?php get_sidebar(); ?>
- </div></div><!-- /#content -->
- <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement