1. <?php get_header(); ?>
  2.  
  3. <?php if ( get_option('solostream_welcome') && is_home() ) { ?>
  4. <div class="welcome-message">
  5. <h2><?php echo stripslashes(get_option('solostream_welcome')); ?></h2>
  6. </div>
  7. <?php } ?>
  8.  
  9. <?php
  10. global $wp_query;
  11. $postid = $wp_query->post->ID;
  12. if ( get_post_meta( $postid, 'post_featcontent', true ) == "Full Width Featured Content Slider" ) { ?>
  13. <?php include (TEMPLATEPATH . '/featured-wide.php'); ?>
  14. <?php } ?>
  15.  
  16. <?php if ( get_post_meta( $postid, 'post_featgalleries', true ) == "Yes" ) { ?>
  17. <?php include (TEMPLATEPATH . '/featured-galleries.php'); ?>
  18. <?php } ?>
  19.  
  20. <div id="page" class="clearfix">
  21.  
  22. <div id="contentleft">
  23.  
  24. <div id="content" class="maincontent">
  25.  
  26. <?php if ( function_exists('yoast_breadcrumb') ) { yoast_breadcrumb('<p id="breadcrumbs">','</p>'); } ?>
  27.  
  28. <?php include (TEMPLATEPATH . '/banner468.php'); ?>
  29.  
  30. <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
  31.  
  32. <div class="singlepage">
  33.  
  34. <div class="post clearfix" id="post-main-<?php the_ID(); ?>">
  35.  
  36. <div class="entry">
  37.  
  38. <h1 class="page-title"><?php the_title(); ?></h1>
  39.  
  40. <?php
  41. $videoembed = get_post_meta( $post->ID, 'video_embed', true );
  42. $mylayout = get_post_meta( $post->ID, 'layout', true );
  43. if ( $videoembed ) { ?>
  44. <div class="single-video">
  45. <?php $embed = $videoembed;
  46. if ( $mylayout && $mylayout !== 'Default' ) {
  47. $layout = $mylayout;
  48. } else {
  49. $layout = get_option('solostream_layout');
  50. }
  51. $alt = preg_match_all('/(width|height)=("[^"]*")/i', $embed, $matches);
  52. if ( $layout == "Content | Sidebar-Narrow | Sidebar-Wide" || $layout == "Sidebar-Narrow | Content | Sidebar-Wide" || $layout == "Sidebar-Wide | Sidebar-Narrow | Content" || $layout == "Sidebar-Wide | Content | Sidebar-Narrow" ) {
  53. $embed = preg_replace('/(width)=("[^"]*")/i', 'width="460"', $embed);
  54. $embed = preg_replace('/(height)=("[^"]*")/i', 'height="350"', $embed);
  55. } elseif ( $layout == "Full-Width" ) {
  56. $embed = preg_replace('/(width)=("[^"]*")/i', 'width="950"', $embed);
  57. $embed = preg_replace('/(height)=("[^"]*")/i', 'height="600"', $embed);
  58. } else {
  59. $embed = preg_replace('/(width)=("[^"]*")/i', 'width="620"', $embed);
  60. $embed = preg_replace('/(height)=("[^"]*")/i', 'height="400"', $embed);
  61. }
  62. echo $embed;
  63. ?>
  64. </div>
  65. <?php } ?>
  66.  
  67. <?php the_content(); ?>
  68.  
  69. <div style="clear:both;"></div>
  70.  
  71. <?php wp_link_pages(); ?>
  72.  
  73. </div>
  74.  
  75. </div>
  76.  
  77.  
  78. </div>
  79.  
  80. <?php endwhile; endif; ?>
  81.  
  82. </div>
  83.  
  84. <?php include (TEMPLATEPATH . '/sidebar-narrow.php'); ?>
  85.  
  86. </div>
  87.  
  88. <?php get_sidebar(); ?>
  89.  
  90. <?php get_footer(); ?>