Advertisement
JosueCR

Home.php

Jun 21st, 2013
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.08 KB | None | 0 0
  1. <?php get_header(); ?>
  2.  
  3.  
  4.  
  5. <div id="content" class="clearfix">
  6.  
  7.  
  8.  
  9. <?php if(of_get_option('sc_blurbhome') == '1') { ?>
  10.  
  11. <!-- begin .blurb -->
  12.  
  13. <div class="container">
  14.  
  15. <div class="intro-page">
  16.  
  17. <?php if(!of_get_option('sc_blurb') == '') { ?>
  18.  
  19. <h2><?php echo of_get_option('sc_blurb') ?></h2>
  20.  
  21. <?php }?>
  22.  
  23. </div>
  24.  
  25. </div>
  26.  
  27. <!-- end .blurb -->
  28.  
  29. <?php } ?>
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41. <?php if(of_get_option('sc_displayslider') == '1') { ?>
  42.  
  43. <?php if(of_get_option('sc_slidertype') == 'flex') { ?>
  44.  
  45. <?php get_template_part( 'homepage', 'slider' ); ?>
  46.  
  47. <?php } ?>
  48.  
  49. <?php } ?>
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59. <?php if(of_get_option('sc_homecontent') == '1') { ?>
  60.  
  61.  
  62.  
  63. <!--begin cols content -->
  64.  
  65. <div class="container clearfix">
  66.  
  67. <?php if( of_get_option('sc_homecontent1img') || of_get_option('sc_homecontent1title') || of_get_option('sc_homecontent1') ) : ?>
  68.  
  69. <div class="one-half">
  70.  
  71. <?php if( of_get_option('sc_homecontent1img')): ?><img src="<?php echo of_get_option('sc_homecontent1img') ?>" class="img-align-left" alt="<?php echo of_get_option('sc_homecontent1title') ?>" /><?php endif ?>
  72.  
  73. <h3><?php echo of_get_option('sc_homecontent1title') ?></h3>
  74.  
  75. <p><?php echo of_get_option('sc_homecontent1') ?></p>
  76.  
  77. <?php if (of_get_option('sc_homecontent1url')!='') { ?>
  78.  
  79. <p class="readmore">
  80.  
  81. <a href="<?php echo of_get_option('sc_homecontent1url') ?>"><?php _e('Read more…', 'site5framework') ?></a>
  82.  
  83. </p>
  84.  
  85. <?php } ?>
  86.  
  87. </div>
  88.  
  89. <?php endif ?>
  90.  
  91.  
  92.  
  93. <?php if( of_get_option('sc_homecontent2img') || of_get_option('sc_homecontent2title') || of_get_option('sc_homecontent2') ) : ?>
  94.  
  95. <div class="one-half last">
  96.  
  97. <?php if( of_get_option('sc_homecontent2img')): ?><img src="<?php echo of_get_option('sc_homecontent2img') ?>" class="img-align-left" alt="<?php echo of_get_option('sc_homecontent2title') ?>" /><?php endif ?>
  98.  
  99. <h3><?php echo of_get_option('sc_homecontent2title') ?></h3>
  100.  
  101. <p><?php echo of_get_option('sc_homecontent2') ?></p>
  102.  
  103. <?php if (of_get_option('sc_homecontent2url')!='') { ?>
  104.  
  105. <p class="readmore">
  106.  
  107. <a href="<?php echo of_get_option('sc_homecontent2url') ?>"><?php _e('Read more…', 'site5framework') ?></a>
  108.  
  109. </p>
  110.  
  111. <?php } ?>
  112.  
  113. </div>
  114.  
  115. <?php endif ?>
  116.  
  117. </div>
  118.  
  119.  
  120.  
  121. <div class="container clearfix">
  122.  
  123. <?php if( of_get_option('sc_homecontent3img') || of_get_option('sc_homecontent3title') || of_get_option('sc_homecontent3') ) : ?>
  124.  
  125. <div class="one-half">
  126.  
  127. <?php if( of_get_option('sc_homecontent3img')): ?><img src="<?php echo of_get_option('sc_homecontent3img') ?>" class="img-align-left" alt="<?php echo of_get_option('sc_homecontent3title') ?>" /><?php endif ?>
  128.  
  129. <h3><?php echo of_get_option('sc_homecontent3title') ?></h3>
  130.  
  131. <p><?php echo of_get_option('sc_homecontent3') ?></p>
  132.  
  133. <?php if (of_get_option('sc_homecontent3url')!='') { ?>
  134.  
  135. <p class="readmore">
  136.  
  137. <a href="<?php echo of_get_option('sc_homecontent3url') ?>"><?php _e('Read more…', 'site5framework') ?></a>
  138.  
  139. </p>
  140.  
  141. <?php } ?>
  142.  
  143. </div>
  144.  
  145. <?php endif ?>
  146.  
  147.  
  148.  
  149. <?php if( of_get_option('sc_homecontent4img') || of_get_option('sc_homecontent4title') || of_get_option('sc_homecontent4') ) : ?>
  150.  
  151. <div class="one-half last">
  152.  
  153. <?php if( of_get_option('sc_homecontent4img')): ?><img src="<?php echo of_get_option('sc_homecontent4img') ?>" class="img-align-left" alt="<?php echo of_get_option('sc_homecontent4title') ?>" /><?php endif ?>
  154.  
  155. <h3><?php echo of_get_option('sc_homecontent4title') ?></h3>
  156.  
  157. <p><?php echo of_get_option('sc_homecontent4') ?></p>
  158.  
  159. <?php if (of_get_option('sc_homecontent4url')!='') { ?>
  160.  
  161. <p class="readmore">
  162.  
  163. <a href="<?php echo of_get_option('sc_homecontent4url') ?>"><?php _e('Read more…', 'site5framework') ?></a>
  164.  
  165. </p>
  166.  
  167. <?php } ?>
  168.  
  169. </div>
  170.  
  171. <?php endif ?>
  172.  
  173.  
  174.  
  175. <div class="horizontal-line"> </div>
  176.  
  177.  
  178.  
  179. </div>
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187. <!-- end cols content -->
  188.  
  189.  
  190.  
  191. <?php } ?>
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199. <?php if(of_get_option('sc_portfoliohome') == '1') : ?>
  200.  
  201. <div class="container clearfix">
  202.  
  203.  
  204.  
  205. <h3><?php echo of_get_option('sc_portfoliohometitle') ?></h3>
  206.  
  207.  
  208.  
  209. <?php
  210.  
  211. $args=array('post_type'=> 'portfolio', 'post_status'=> 'publish','orderby'=> 'date','posts_per_page'=>8,'showposts'=>8,'caller_get_posts'=>1,'paged'=>$paged,); query_posts($args);
  212.  
  213. if ( have_posts() ) :
  214.  
  215. ?>
  216.  
  217. <ul id="projects-carousel" class="loading">
  218.  
  219. <?php
  220.  
  221. while (have_posts()): the_post();
  222.  
  223. $categories = wp_get_object_terms( get_the_ID(), 'types');
  224.  
  225. ?>
  226.  
  227. <!-- PROJECT ITEM STARTS -->
  228.  
  229. <li>
  230.  
  231. <div class="item-content">
  232.  
  233. <div class="link-holder">
  234.  
  235. <div class="portfolio-item-holder">
  236.  
  237. <div class="portfolio-item-hover-content">
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247. <?php
  248.  
  249. $thumbId = get_image_id_by_link ( get_post_meta($post->ID, 'snbp_pitemlink', true) );
  250.  
  251.  
  252.  
  253. $thumb = wp_get_attachment_image_src($thumbId, 'portfolio-thumbnail', false);
  254.  
  255. $large = wp_get_attachment_image_src($thumbId, 'large', false);
  256.  
  257.  
  258.  
  259. if (!$thumb == ''){ ?>
  260.  
  261.  
  262.  
  263. <a href="<?php echo $large[0] ?>" title="<?php the_title(); ?>" data-rel="prettyPhoto" class="zoom">View Image</a>
  264.  
  265.  
  266.  
  267. <img src="<?php echo $thumb[0] ?>" alt="<?php the_title(); ?>" width="220" class="portfolio-img" />
  268.  
  269. <?php } else { ?>
  270.  
  271. <img src="<?php echo get_template_directory_uri(); ?>/library/images/sampleimages/portfolio-img.jpg" alt="<?php the_title(); ?>" width="220" class="portfolio-img" />
  272.  
  273. <?php }?>
  274.  
  275.  
  276.  
  277. <div class="hover-options"></div>
  278.  
  279. </div>
  280.  
  281. </div>
  282.  
  283. <div class="description">
  284.  
  285. <p>
  286.  
  287. <a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"> <?php the_title(); ?> </a>
  288.  
  289. </p>
  290.  
  291. <span><?php $separator = ''; foreach ($categories as $category) { echo $separator . $category->name; $separator=' / ';} ?></span>
  292.  
  293. </div>
  294.  
  295. </div>
  296.  
  297. </div>
  298.  
  299. </li>
  300.  
  301. <!-- PROJECT ITEM ENDS -->
  302.  
  303. <?php
  304.  
  305. endwhile;
  306.  
  307. wp_reset_query();
  308.  
  309. ?>
  310.  
  311. </ul>
  312.  
  313. <!-- // optional "view full portfolio" button on homepage featured projects -->
  314.  
  315. <a href="<?php echo of_get_option('sc_portfoliohomebuttonurl') ?>" class="colored" title="<?php echo of_get_option('sc_portfoliohomebuttontitle') ?>"><?php echo of_get_option('sc_portfoliohomebuttontitle') ?></a>
  316.  
  317. <?php
  318.  
  319. else :
  320.  
  321. ?>
  322.  
  323.  
  324.  
  325. <?php
  326.  
  327. endif;
  328.  
  329. ?>
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337. </div>
  338.  
  339. <?php endif ?>
  340.  
  341.  
  342.  
  343.  
  344.  
  345.  
  346.  
  347. </div> <!-- end #content -->
  348.  
  349. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement