Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

SINGLE.PHP

By: a guest on Oct 6th, 2012  |  syntax: None  |  size: 4.45 KB  |  views: 31  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php get_header(); ?>
  2. <?php
  3. $lcmp_page_head = <<<TXT
  4. <div class="contentLayout">
  5. <div class="sidebar1">
  6. <?php include (TEMPLATEPATH . '/sidebar1.php'); ?>
  7. </div>
  8. <div class="content">
  9.  
  10. TXT;
  11. $lcmp_is_left = strpos($lcmp_page_head,"sidebar");
  12. if($lcmp_is_left===FALSE){
  13.     $lcmp_rightdefault = 'default';
  14.     $lcmp_leftdefault = 'notdefault';
  15. }else{
  16.     $lcmp_leftdefault = 'default';
  17.     $lcmp_rightdefault = 'notdefault';
  18. }
  19. ?>
  20. <div class="contentLayout">
  21. <?php
  22. global $lcmp_sidebarloc;
  23. if($lcmp_sidebarloc == $lcmp_leftdefault || $lcmp_sidebarloc == 'left'){ ?>
  24. <div class="sidebar1">
  25. <?php include (TEMPLATEPATH . '/sidebar1.php'); ?>
  26. </div>
  27. <?php } ?>
  28. <div class="content">
  29. <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
  30. <div class="Post">
  31.     <div class="Post-tl"></div>
  32.     <div class="Post-tr"><div></div></div>
  33.     <div class="Post-bl"><div></div></div>
  34.     <div class="Post-br"><div></div></div>
  35.     <div class="Post-tc"><div></div></div>
  36.     <div class="Post-bc"><div></div></div>
  37.     <div class="Post-cl"><div></div></div>
  38.     <div class="Post-cr"><div></div></div>
  39.     <div class="Post-cc"></div>
  40.     <div class="Post-body">
  41. <div class="Post-inner article">
  42. <h2 class="PostHeaderIcon-wrapper">
  43. <span class="PostHeader"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(__('Permanent Link to %s', 'kubrick'), the_title_attribute('echo=0')); ?>">
  44. <?php the_title(); ?>
  45. </a></span>
  46. </h2>
  47. <?php $icons = array(); ?>
  48. <?php if (!is_page()) : ?>
  49. <?php ob_start(); ?>
  50. <img src="<?php bloginfo('template_url'); ?>/images/PostDateIcon.png" width="18" height="18" alt="PostDateIcon" />
  51. <?php the_time(__('F jS, Y', 'kubrick')) ?>
  52. <?php $icons[] = ob_get_clean(); ?>
  53. <?php endif; ?>
  54. <?php if (!is_page()) : ?>
  55. <?php ob_start(); ?>
  56. <img src="<?php bloginfo('template_url'); ?>/images/PostAuthorIcon.png" width="14" height="14" alt="PostAuthorIcon" />
  57. <?php _e('Author', 'kubrick'); ?>: <a href="#" title="<?php _e('Author', 'kubrick'); ?>"><?php the_author() ?></a>
  58. <?php $icons[] = ob_get_clean(); ?>
  59. <?php endif; ?>
  60. <?php if (current_user_can( 'edit_post', $post->ID )) : ?><?php ob_start(); ?>
  61. <img src="<?php bloginfo('template_url'); ?>/images/PostEditIcon.png" width="16" height="16" alt="PostEditIcon" />
  62. <?php edit_post_link(__('Edit', 'kubrick'), ''); ?>
  63. <?php $icons[] = ob_get_clean(); ?><?php endif; ?>
  64. <?php if (0 != count($icons)): ?>
  65. <div class="PostHeaderIcons metadata-icons">
  66. <?php echo implode(' | ', $icons); ?>
  67.  
  68. </div>
  69. <?php endif; ?>
  70. <div class="PostContent">
  71. <?php if (is_search()) the_excerpt(); else the_content(__('Read the rest of this entry &raquo;', 'kubrick')); ?>
  72.  
  73. </div>
  74. <div class="cleared"></div>
  75. <?php $icons = array(); ?>
  76. <?php if (!is_page()) : ?>
  77. <?php ob_start(); ?>
  78. <img src="<?php bloginfo('template_url'); ?>/images/PostCategoryIcon.png" width="18" height="18" alt="PostCategoryIcon" />
  79. <?php printf(__('Posted in %s', 'kubrick'), get_the_category_list(', ')); ?>
  80. <?php $icons[] = ob_get_clean(); ?>
  81. <?php endif; ?>
  82. <?php if (!is_page() && get_the_tags()) : ?><?php ob_start(); ?>
  83. <img src="<?php bloginfo('template_url'); ?>/images/PostTagIcon.png" width="18" height="18" alt="PostTagIcon" />
  84. <?php the_tags(__('Tags:', 'kubrick') . ' ', ', ', ' '); ?>
  85. <?php $icons[] = ob_get_clean(); ?><?php endif; ?>
  86. <?php if (!is_page() && !is_single()) : ?><?php ob_start(); ?>
  87. <img src="<?php bloginfo('template_url'); ?>/images/PostCommentsIcon.png" width="18" height="18" alt="PostCommentsIcon" />
  88. <?php comments_popup_link(__('No Comments &#187;', 'kubrick'), __('1 Comment &#187;', 'kubrick'), __('% Comments &#187;', 'kubrick'), '', __('Comments Closed', 'kubrick') ); ?>
  89. <?php $icons[] = ob_get_clean(); ?><?php endif; ?>
  90. <?php if (0 != count($icons)): ?>
  91. <div class="PostFooterIcons metadata-icons">
  92. <?php echo implode(' | ', $icons); ?>
  93.  
  94. </div>
  95. <?php endif; ?>
  96.  
  97. </div>
  98.  
  99.     </div>
  100. </div>
  101.  
  102. <?php comments_template(); ?>
  103. <?php endwhile; ?>
  104. <?php else: ?>
  105. <p><?php _e('Sorry, no posts matched your criteria.', 'kubrick'); ?></p>
  106. <?php endif; ?>
  107. </div>
  108. <?php
  109. global $lcmp_sidebarloc;
  110. if($lcmp_sidebarloc == $lcmp_rightdefault || $lcmp_sidebarloc == 'right'){ ?>
  111. <div class="sidebar1">
  112. <?php include (TEMPLATEPATH . '/sidebar1.php'); ?>
  113. </div>
  114. <?php } ?>
  115. <?php if(file_exists(TEMPLATEPATH . '/sidebar2.php')){ ?>
  116. <div class="sidebar2">
  117. <?php include (TEMPLATEPATH . '/sidebar2.php'); ?>
  118. </div>
  119. <?php } ?>
  120. </div>
  121. <div class="cleared"></div>
  122. <?php get_footer(); ?>