Advertisement
Guest User

Untitled

a guest
Jul 16th, 2012
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.87 KB | None | 0 0
  1. <?php
  2. /**
  3. * The main template file for display single post page.
  4. *
  5. * @package WordPress
  6. * @subpackage Pim
  7. */
  8.  
  9. get_header();
  10.  
  11. ?>
  12. <!-- Begin content -->
  13. <div id="content_wrapper">
  14.  
  15. <div class="inner">
  16.  
  17. <!-- Begin main content -->
  18. <div class="inner_wrapper">
  19.  
  20. <div class="two_third large">
  21. <?php
  22.  
  23. if (have_posts()) : while (have_posts()) : the_post();
  24.  
  25. ?>
  26.  
  27. <!-- Begin each blog post -->
  28. <div class="post_wrapper">
  29. <hr class="feat vid">
  30. <div style="padding:0 15px;">
  31. <div class="post_header">
  32. <div style="width:85%;margin-top:25px">
  33. <span class="tag_green">
  34. <span style="font-size:24px;">
  35. <a href="<?php home_url(); ?>/videopagine-della-comunicazione/" title="Torna alle Videopagine della comunicazione">Videopagine della comunicazione</a> / </span>
  36. <span style="font-size:18px;"><?php
  37. $category = get_the_category();
  38. if($category[0]){
  39. echo '<a href="'.get_category_link($category[0]->term_id ).'">'.$category[0]->cat_name.'</a>';
  40. }
  41. ?></span>
  42. </span>
  43. </div>
  44. <h1 class="cufon" style="margin-top:0;margin-bottom:20px;">
  45. <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
  46. <?php the_title(); ?>
  47. </a>
  48. </h1>
  49.  
  50. </div>
  51. <?php
  52. if( get_post_meta(get_the_ID(), 'blog_thumb_image_url', true) ) :
  53. $image_thumb = get_post_meta(get_the_ID(), 'blog_thumb_image_url', true);
  54. ?>
  55. <div class="post_img">
  56. <img class="alignleft image_box" src="<?php echo get_bloginfo( 'stylesheet_directory' ); ?>/timthumb.php?src=<?php echo $image_thumb; ?>&h=380&w=601&zc=1" alt="" />
  57. </div>
  58. <?php endif; ?>
  59. <?php
  60. print_custom_field('videopreview:wrapper'
  61. , '<div class="post_vid pagine"><div class="lite videos" id="[+content+]" style="width:601px;height:380px;"></div></div>'
  62. , '<em></em>');
  63. ?>
  64.  
  65.  
  66. <?php echo the_content(); ?>
  67. <br class="clear"/>
  68. <?php
  69. print_custom_field('competenze:wrapper:do_shortcode'
  70. , '<div style="margin-bottom:25px;">
  71. <hr class="section" /><span class="tag_section">Competenze</span><hr class="section" /><div style="margin-top:25px;">[+content+]</div>
  72. </div>'
  73. );
  74. ?>
  75.  
  76. <?php
  77. print_custom_field('contatti:wrapper:do_shortcode'
  78. , '<div class="one_half" style="margin-bottom: 25px;">
  79. <hr class="section" /><span class="tag_section">Contatti</span><hr class="section" /><div style="margin-top:25px;">[+content+]</div>
  80. </div>'
  81. );
  82. ?>
  83.  
  84. <?php
  85. print_custom_field('board:wrapper:do_shortcode'
  86. , '<div class="one_half last" style="margin-bottom: 25px;">
  87. <hr class="section" /><span class="tag_section">Board</span><hr class="section" /><div style="margin-top:25px;">[+content+]</div>
  88. </div>'
  89. );
  90. ?>
  91.  
  92. <?php
  93. print_custom_field('conosciamoci:wrapper:do_shortcode'
  94. , '<div style="margin-bottom:25px;clear:both;">
  95. <hr class="section" /><span class="tag_section">Conosciamoci meglio</span><hr class="section" /><div style="margin-top:25px;">[+content+]</div></div>'
  96. );
  97. ?>
  98. </div>
  99. </div>
  100. <!-- End each blog post -->
  101. <hr/>
  102. <br class="clear"/>
  103.  
  104. <?php
  105. //for use in the loop, list 5 post titles related to first tag on current post
  106. $tags = wp_get_post_tags($post->ID);
  107. if ($tags) {
  108. $first_tag = $tags[0]->term_id;
  109. $args=array(
  110. 'tag__in' => array($first_tag),
  111. 'post__not_in' => array($post->ID),
  112. 'showposts'=>100,
  113. 'caller_get_posts'=>1
  114. );
  115. $my_query = new WP_Query($args);
  116. if( $my_query->have_posts() ) {
  117. echo '<h5><span class="tag_green">Articoli Correlati</span></h5>';
  118. echo '<ul class="posts related">';
  119.  
  120. while ($my_query->have_posts()) : $my_query->the_post();
  121. ?>
  122.  
  123. <div class="post_wrapper rubrica" style="display:inline-block">
  124. <hr class="feat rub">
  125. <div class="title_home">
  126. <?php
  127. $category = get_the_category();
  128. echo '<span class="tag_red">'.$category[0]->cat_name.'</span>';
  129. ?>
  130. <h3>
  131. <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
  132. <?php the_title(); ?>
  133. </a>
  134. </h3>
  135. </div>
  136.  
  137. <div class="date_post">
  138. <?php
  139. $x = get_custom_field('datapub');
  140. $time = strtotime($x);
  141. print date('d', $time);
  142. ?>
  143. <div class="month_post"><?php print date('M', $time); ?></div>
  144. </div>
  145. </div>
  146. <?php
  147. endwhile;
  148.  
  149. wp_reset_query();
  150.  
  151. echo '</ul>';
  152. }
  153. }
  154. ?>
  155.  
  156. <?php endwhile; endif; ?>
  157.  
  158. <div style="clear: both; position: relative;">
  159. <div class="video_email">Se vuoi una Videopagina manda una mail a <a href="mailto:info@youmark.it">info@youmark.it</a></div>
  160. <div class="pagination"><p><?php posts_nav_link(' '); ?></p></div>
  161. </div>
  162.  
  163. </div>
  164.  
  165. <div class="one_fourth home last">
  166. <div class="sidebar">
  167.  
  168. <div class="content">
  169.  
  170. <ul class="sidebar_widget">
  171. <?php dynamic_sidebar('Videopagine Single'); ?>
  172. </ul>
  173.  
  174. </div>
  175.  
  176. </div>
  177. <br class="clear"/>
  178.  
  179. <div class="sidebar_bottom"></div>
  180. </div>
  181.  
  182. </div>
  183. <!-- End main content -->
  184.  
  185. <br class="clear"/>
  186. </div>
  187.  
  188. <div class="bottom"></div>
  189.  
  190. </div>
  191. <!-- End content -->
  192.  
  193.  
  194.  
  195. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement