Guest User

Untitled

a guest
Oct 12th, 2011
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.68 KB | None | 0 0
  1. <?php
  2. get_header();
  3. ?>
  4.  
  5. <!-- Begin #colLeft -->
  6. <div id="colLeft">
  7. <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
  8. <!-- Begin .postBox -->
  9. <div class="postBox">
  10. <div class="postBoxTop"></div>
  11. <div class="postBoxMid">
  12. <div class="postBoxMidInner first clearfix">
  13. <div class="date"><?php the_time('M') ?><br /><span class="day"><?php the_time('j') ?></span><br /><?php the_time('Y') ?></div>
  14. <div class="category"><?php the_category(' // ') ?> </div>
  15. <div class="postMetaSingle">
  16. <img src="<?php bloginfo('template_directory'); ?>/images/eye.png" alt="Views" title="views" /> <?php print_page_views(get_the_ID('')); ?> &nbsp;&nbsp;&nbsp; <img src="<?php bloginfo('template_directory'); ?>/images/comments_bw.png" alt="Comments" title="comments" /> <?php comments_popup_link('0', '10', '%'); ?> </div>
  17. <div class="latest_post_box_edge"><img src="http://zoomingjapan.com/wp-content/themes/alltuts/images/latest_post_box_edge.png" alt="latest_post_box_edge" /></div>
  18. <div class="title"><h1><?php the_title(); ?></h1></div>
  19. <?php edit_post_link('<img src="http://www.zoomingjapan.com/wp-content/themes/alltuts/images/edit.gif" border="0" />'); ?>
  20.  
  21.  
  22. <?php the_content(); ?>
  23. <div class="pagelink"><?php wp_link_pages(array('before' => '<p><strong>Pages: </strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?></div>
  24. <?php the_tags('<div class="postTags">',' ','<br /></div>'); ?>
  25.  
  26. </div>
  27. <div class="postCredentials">
  28. <h2>Enjoyed this post?</h2>
  29. <!-- Social Sharing Icons -->
  30. <div class="social_suscribe"><div class="social">
  31. <h3>Share:</h3>
  32. <a href="http://twitter.com/home/?status=<?php the_title(); ?> : <?php the_permalink(); ?>" title="Tweet this!">
  33. <img src="<?php bloginfo('template_directory'); ?>/images/social2/twitter.png" alt="Tweet this!" /></a>
  34. <a href="http://www.facebook.com/sharer.php?u=<?php the_permalink();?>&amp;amp;t=<?php the_title(); ?>" title="Share on Facebook.">
  35. <img src="<?php bloginfo('template_directory'); ?>/images/social2/facebook.png" alt="Share on Facebook" id="sharethis-last" /></a>
  36. <a href="http://www.stumbleupon.com/submit?url=<?php the_permalink(); ?>&amp;amp;title=<?php the_title(); ?>" title="StumbleUpon.">
  37. <img src="<?php bloginfo('template_directory'); ?>/images/social2/stumpleupon.png" alt="StumbleUpon" /></a>
  38. <a href="http://digg.com/submit?phase=2&amp;amp;url=<?php the_permalink(); ?>&amp;amp;title=<?php the_title(); ?>" title="Digg this!">
  39. <img src="<?php bloginfo('template_directory'); ?>/images/social2/digg.png" alt="Digg This!" /></a>
  40. <a href="http://del.icio.us/post?url=<?php the_permalink(); ?>&amp;amp;title=<?php the_title(); ?>" title="Bookmark on Delicious.">
  41. <img src="<?php bloginfo('template_directory'); ?>/images/social2/delicious.png" alt="Bookmark on Delicious" /></a>
  42. <a href="http://reddit.com/submit?url=<?php the_permalink(); ?>&amp;amp;title=<?php the_title(); ?>" title="Bookmark on Reddit.">
  43. <img src="<?php bloginfo('template_directory'); ?>/images/social2/reddit.png" alt="Bookmark on Delicious" /></a>
  44. <a href="http://technorati.com/signup/?url=<?php the_permalink(); ?>&amp;amp;title=<?php the_title(); ?>" title="Share on Technorati.">
  45. <img src="<?php bloginfo('template_directory'); ?>/images/social2/technorati.png" alt="Bookmark on Delicious" /></a>
  46.  
  47. </div>
  48. <!-- end Social Sharing Icons -->
  49.  
  50.  
  51. <!-- Social Suscribing -->
  52. <div class="suscribe"> <h3>Suscribe:</h3>
  53. <a href="http://www.zoomingjapan.com/feed" title="Suscribe to RSS feed"><img src="<?php bloginfo('template_directory'); ?>/images/social2/rss.png" alt="rss" /></a>
  54. <a href="http://www.twitter.com/zoomingjapan" title="Follow me on Twitter"><img src="<?php bloginfo('template_directory'); ?>/images/social2/twitter.png" alt="twitter" /></a>
  55. <a href="http://www.flickr.com/photos/zoomingjapan/" title="Always get the latest photos at my Flickr"><img src="<?php bloginfo('template_directory'); ?>/images/social2/flickr.png" alt="flickr" /></a>
  56. </div>
  57. <!-- end Social Suscribing -->
  58.  
  59.  
  60. <!-- Sweet Coffee -->
  61. <div class="sushi">
  62. <h3>Sushi:</h3>
  63. <a id="sushi"><img src="http://zoomingjapan.com/wp-content/themes/alltuts/images/sushi.png" alt="" /></a>
  64. <div class="tooltip_sushi">Do you enjoy this website? Great! It would be awesome if you could help to keep it running. It costs a lot of money and effort to keep this website alive! <img src="http://zoomingjapan.com/wp-includes/images/smilies/e%20%2826%29.gif" alt="" /> So how about inviting me to some <b>yummie sushi</b>?<br />
  65. Thank you so much! <img src="http://zoomingjapan.com/wp-includes/images/smilies/e%20%2811%29.gif" alt="" />
  66. <form style="text-align: right;" action="https://www.paypal.com/cgi-bin/webscr" method="post"><input type="hidden" name="cmd" value="_s-xclick"><input type="hidden" name="hosted_button_id" value="6SYCQGTMEWHQS"><input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!"><img alt="" border="0" src="https://www.paypalobjects.com/de_DE/i/scr/pixel.gif" width="1" height="1"></form></div>
  67.  
  68. </div>
  69. <!-- end Sweet Coffee -->
  70.  
  71. </div>
  72.  
  73.  
  74.  
  75.  
  76.  
  77. <h2>Related Posts</h2>
  78.  
  79.  
  80. <!-- "previous page" action -->
  81. <a class="prev browse left"></a>
  82.  
  83. <!-- root element for scrollable -->
  84. <div class="scrollable" id=chained>
  85.  
  86. <!-- root element for the items -->
  87. <div class="items">
  88.  
  89.  
  90. <!-- 1-5 -->
  91. <div>
  92.  
  93. <!-- Related Posts-->
  94.  
  95. <?php
  96. $backup = $post;
  97. $tags = wp_get_post_tags($post->ID);
  98. if ($tags) {
  99. $tag_ids = array();
  100. foreach($tags as $individual_tag) $tag_ids[] = $individual_tag->term_id;
  101.  
  102. $args = array(
  103. 'tag__in' => $tag_ids,
  104. 'post__not_in' => array($post->ID),
  105. 'posts_per_page'=> 12
  106. );
  107. $my_query = new WP_Query( $args );
  108. if( $my_query->have_posts() ):
  109. ?>
  110. <div class="relatedPosts">
  111. <?php
  112. while ( $my_query->have_posts() ) : $my_query->the_post(); ?>
  113. <a href="<?php the_permalink() ?>" rel="bookmark"><?php the_post_thumbnail(array(120,80)); ?></a>
  114. <div class="relatedPosts_title"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></div></div>
  115. // if this is not the last post
  116. // and remainder of current post plus one then divided by four is zero
  117. // close the container and open a new one
  118. <?php if( $my_query->current_post != ( $my_query->post_count - 1 ) && ( ( $my_query->current_post + 1 ) % 4 ) == 0 ):
  119. ?>
  120. </div>
  121. <div class="relatedPosts">
  122. <?php
  123. endif;
  124.  
  125. endwhile;
  126. ?>
  127. </div>
  128. <?php
  129. endif; ?>
  130.  
  131. <?php
  132. $post = $backup;
  133. wp_reset_query(); ?>
  134.  
  135. <!-- end Related Posts-->
  136. </div>
  137.  
  138. <!-- 6-10 -->
  139. <div>
  140.  
  141. <!-- Related Posts-->
  142.  
  143. <!-- end Related Posts-->
  144. </div>
  145.  
  146. </div>
  147.  
  148. </div>
  149.  
  150. <!-- "next page" action -->
  151. <a class="next browse right"></a>
  152.  
  153.  
  154. <br clear="all" />
  155.  
  156.  
  157. </div>
  158. <div class="postBoxMidInner">
  159.  
  160.  
  161.  
  162. <?php comments_template(); ?>
  163. </div>
  164. </div>
  165. <div class="postBoxBottom"></div>
  166. </div>
  167. <?php endwhile; else: ?>
  168.  
  169. <p>Sorry, but you are looking for something that isn't here.</p>
  170.  
  171. <?php endif; ?>
  172.  
  173.  
  174. </div>
  175. <!-- End #colLeft -->
  176.  
  177. <?php get_sidebar(); ?>
  178.  
  179. <?php get_footer(); ?>
  180.  
  181.  
Add Comment
Please, Sign In to add comment