Advertisement
DySt4f

page

Oct 21st, 2012
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.76 KB | None | 0 0
  1. <?php //get theme options
  2. global $con_front, $con_layout, $con_feed, $con_reviews, $con_ads, $con_misc;
  3. $con_front = get_option( 'con_front', $con_front );
  4. $con_layout = get_option( 'con_layout', $con_layout );
  5. $con_feed = get_option( 'con_feed', $con_feed );
  6. $con_reviews = get_option( 'con_reviews', $con_reviews );
  7. $con_ads = get_option( 'con_ads', $con_ads );
  8. $con_misc = get_option( 'con_misc', $con_misc ); ?>
  9.  
  10. <?php //set theme options
  11. $con_page_latest_show = $con_layout['page_latest_show'];
  12. $con_page_feed_show = $con_layout['page_feed_show'];
  13. $con_page_unique_sidebar = $con_layout['page_unique_sidebar'];
  14. $con_breadcrumb_show = $con_layout['page_breadcrumb_show'];
  15. $con_featuredimage_size = $con_layout['featuredimage_size'];
  16. $con_page_ad_post_show = $con_ads['page_ad_post_show'];
  17. $con_page_ad_feed_show = $con_ads['page_ad_feed_show'];
  18. $con_page_ad_post = $con_ads['page_ad_post'];
  19. $con_page_ad_feed = $con_ads['page_ad_feed'];
  20. ?>
  21.  
  22. <?php // use variables from page custom fields instead of continuum options page (if they exist)
  23. $override = get_post_meta($post->ID, "Show Latest Panel", $single = true);
  24. if($override!="") {
  25. $con_page_latest_show=$override;
  26. if($con_page_latest_show=="false") {
  27. $con_page_latest_show=false;
  28. } else {
  29. $con_page_latest_show=true;
  30. }
  31. }
  32. $override = get_post_meta($post->ID, "Show Feed", $single = true);
  33. if($override!="") {
  34. $con_page_feed_show=$override;
  35. if($con_page_feed_show=="false") {
  36. $con_page_feed_show=false;
  37. } else {
  38. $con_page_feed_show=true;
  39. }
  40. }
  41. $override = get_post_meta($post->ID, "Featured Image Size", $single = true);
  42. if($override!="") $con_featuredimage_size=$override;
  43. $override = get_post_meta($post->ID, "Show Ad Below Post", $single = true);
  44. if($override!="") {
  45. $con_page_ad_post_show=$override;
  46. if($con_page_ad_post_show=="false") {
  47. $con_page_ad_post_show=false;
  48. } else {
  49. $con_page_ad_post_show=true;
  50. }
  51. }
  52. $override = get_post_meta($post->ID, "Show Ad Below Feed", $single = true);
  53. if($override!="") {
  54. $con_page_ad_feed_show=$override;
  55. if($con_page_ad_feed_show=="false") {
  56. $con_page_ad_feed_show=false;
  57. } else {
  58. $con_page_ad_feed_show=true;
  59. }
  60. }
  61. ?>
  62.  
  63. <?php
  64. $sidebar="Sidebar Default";
  65. if($con_page_unique_sidebar) $sidebar="Sidebar Page"; ?>
  66.  
  67. <?php get_header(); // show header ?>
  68. <div id="content">
  69. <div class="padder">
  70.  
  71. <div id="page-content">
  72.  
  73. <div class="left-panel">
  74.  
  75. <div class="content">
  76.  
  77. <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
  78.  
  79. <?php if($con_breadcrumb_show) { ?>
  80.  
  81. <?php con_get_breadcrumb(); ?>
  82.  
  83. <?php } ?>
  84.  
  85. <h2 class="title adelle"><?php the_title(); ?></h2>
  86.  
  87. <?php if($con_featuredimage_size=="full" && has_post_thumbnail()) { ?>
  88.  
  89. <div class="article-image">
  90.  
  91. <?php the_post_thumbnail('single', array( 'title' => '' )); ?>
  92.  
  93. </div>
  94.  
  95. <?php } elseif($con_featuredimage_size=="medium" && has_post_thumbnail()) { ?>
  96.  
  97. <div class="article-image">
  98.  
  99. <?php the_post_thumbnail('single-medium', array( 'title' => '' )); ?>
  100.  
  101. </div>
  102.  
  103. <?php } elseif($con_featuredimage_size=="small" && has_post_thumbnail()) { ?>
  104.  
  105. <div class="article-image">
  106.  
  107. <?php the_post_thumbnail('single-small', array( 'title' => '' )); ?>
  108.  
  109. </div>
  110.  
  111. <?php } ?>
  112.  
  113. <?php con_get_sharebox(); ?>
  114.  
  115. <div class="post-content">
  116.  
  117. <?php the_content(); ?>
  118.  
  119. </div>
  120.  
  121. <?php endwhile;
  122. endif; ?>
  123.  
  124. <br class="clearer" />
  125.  
  126. </div>
  127.  
  128. </div>
  129.  
  130. <div class="right-panel sidebar">
  131.  
  132. <div class="inner">
  133.  
  134. <?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar($sidebar) ) : else : ?>
  135.  
  136. <div id="tabbed-posts">
  137. <ul class="tabnav">
  138. <li><a href="#tabs-popular">Popular</a></li>
  139. <li><a href="#tabs-recent">Recent</a></li>
  140. <li><a href="#tabs-comments">Comments</a></li>
  141. <li><a href="#tabs-tags">Tags</a></li>
  142. </ul>
  143.  
  144. <div class="tabdiv-wrapper">
  145.  
  146. <div id="tabs-popular" class="tabdiv">
  147. <ul>
  148. <?php // create popular query
  149. $postcount=0;
  150. $args='order=DESC&orderby=comment_count&posts_per_page=10';
  151. $pop_loop = new WP_Query($args);
  152. if ($pop_loop->have_posts()) : while ($pop_loop->have_posts()) : $pop_loop->the_post(); $postcount++; ?>
  153. <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
  154. <?php endwhile;
  155. endif; ?>
  156. <li class="last gentesque tooltip" title="View all articles sorted by comment count"><a href="<?php echo home_url(); ?>/<?php con_get_feed_link('comment_count') ?>">More</a></li>
  157. </ul>
  158. </div>
  159.  
  160. <div id="tabs-recent" class="tabdiv">
  161. <ul>
  162. <?php // create recent query
  163. $postcount=0;
  164. $args='order=DESC&orderby=date&posts_per_page=10';
  165. $pop_loop = new WP_Query($args);
  166. if ($pop_loop->have_posts()) : while ($pop_loop->have_posts()) : $pop_loop->the_post(); $postcount++; ?>
  167. <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
  168. <?php endwhile;
  169. endif; ?>
  170. <li class="last gentesque tooltip" title="View all articles sorted by date"><a href="<?php echo home_url(); ?>/<?php con_get_feed_link('date') ?>">More</a></li>
  171. </ul>
  172. </div>
  173.  
  174. <div id="tabs-comments" class="tabdiv">
  175. <ul>
  176. <?php //get recent comments
  177. $args = array(
  178. 'status' => 'approve',
  179. 'number' => 10
  180. );
  181. $comments = get_comments($args);
  182. foreach($comments as $comment) :
  183. $commentcontent = strip_tags($comment->comment_content);
  184. if (strlen($commentcontent)>110) {
  185. $commentcontent = substr($commentcontent, 0, 107) . "...";
  186. }
  187. $commentauthor = $comment->comment_author;
  188. if (strlen($commentauthor)>50) {
  189. $commentauthor = substr($commentauthor, 0, 47) . "...";
  190. }
  191. $commentid = $comment->comment_ID;
  192. $commenturl = get_comment_link($commentid); ?>
  193. <li><a href="<?php echo $commenturl; ?>">"<?php echo $commentcontent; ?>"<span> -&nbsp;<?php echo $commentauthor; ?></span></a></li>
  194. <?php endforeach; ?>
  195. </ul>
  196. </div>
  197.  
  198. <div id="tabs-tags" class="tabdiv">
  199.  
  200. <?php wp_tag_cloud('smallest=8&largest=22&number=20&orderby=name'); ?>
  201.  
  202. </div>
  203.  
  204. </div>
  205.  
  206. </div>
  207.  
  208. <div class="widget">
  209.  
  210. <div class="header-left">&nbsp;</div>
  211.  
  212. <div class="header-middle">
  213.  
  214. <h2 class="gentesque"><?php _e(' About Continuum ', 'continuum' ); ?></h2>
  215.  
  216. </div>
  217.  
  218. <div class="header-right">&nbsp;</div>
  219.  
  220. <br class="clearer" />
  221.  
  222. <div class="content-wrapper">
  223.  
  224. <div class="content">
  225.  
  226. <p>
  227. <?php _e( "This is a custom sidebar. Continuum gives you lots of custom sidebar possibilities. You can use the Continuum Theme Options page to specify which pages have a unique sidebar. Or, you can use the same sidebar for all of your pages using the Sidebar Default widget panel. If you do specify that you want a unique sidebar for an area of your site, such as the Search page, you can use the corresponding built-in Sidebar Search widget panel.", 'continuum' ); ?>
  228. </p>
  229.  
  230. <p>
  231. <?php _e( "In fact, Continuum comes standard with 19 unique sidebars. Wow, we're starting to sound like a car commercial, so we'll add that you don't have to use all of them if you don't want. Continuum harnesses the power of absolute customization while at the same time having a quality of meekness: you can forget about all the settings and get yourself up and running in no time flat.", 'continuum' ); ?>
  232. </p>
  233.  
  234. </div>
  235.  
  236. </div>
  237.  
  238. </div>
  239.  
  240. <?php endif; ?>
  241.  
  242. </div>
  243.  
  244. </div>
  245.  
  246. <br class="clearer" />
  247.  
  248. </div>
  249. </div>
  250. </div>
  251.  
  252. <?php if($con_page_ad_post_show) { ?>
  253. <div class="full-width-ad">
  254. <?php echo $con_page_ad_post; // ad ?>
  255. </div>
  256. <?php } ?>
  257.  
  258. <?php if($con_page_feed_show) { // show Feed ?>
  259. <?php con_get_feed(); ?>
  260. <?php } ?>
  261.  
  262. <?php if($con_page_ad_feed_show) { ?>
  263. <div class="full-width-ad">
  264. <?php echo $con_page_ad_feed; // ad ?>
  265. </div>
  266. <?php } ?>
  267.  
  268. <?php if($con_page_latest_show) { // show The Latest panel ?>
  269. <?php con_get_latest(); ?>
  270. <?php } ?>
  271.  
  272. <?php get_footer(); // show footer ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement