Advertisement
Guest User

Untitled

a guest
Mar 12th, 2012
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.86 KB | None | 0 0
  1. <?php
  2. /**
  3. * @package WordPress
  4. * @subpackage proyecto Theme
  5. */
  6. $options = get_option( 'proyecto_theme_settings' );
  7. ?>
  8. <?php get_header(' '); ?>
  9.  
  10. <div class="home-wrap clearfix">
  11.  
  12. <!-- Homepage Slider -->
  13. <?php get_template_part( 'includes/nivo' ) ?>
  14.  
  15. <?php if($options['home_tagline'] !='') { ?>
  16. <div id="home-tagline">
  17. <?php echo $options['home_tagline'] ?>
  18. </div>
  19. <?php } ?>
  20. </div>
  21. <!-- Homepage Highlights -->
  22. <?php
  23. //get post type ==> hp highlights
  24. global $post;
  25. $args = array(
  26. 'post_type' =>'hp_highlights',
  27. 'numberposts' => '-1'
  28. );
  29. $portfolio_posts = get_posts($args);
  30. ?>
  31. <?php if($portfolio_posts) { ?>
  32.  
  33.  
  34. <div id="home-highlights" class="clearfix">
  35. <?php
  36. $count=0;
  37. foreach($portfolio_posts as $post) : setup_postdata($post);
  38. $count++;
  39. ?>
  40.  
  41. <div class="hp-highlight <?php if($count == '4') { echo 'no-margin'; } ?>">
  42. <h2><?php the_title(); ?></h2>
  43. <?php the_content(); ?>
  44. </div>
  45.  
  46. <?php
  47. if($count == '4') { echo '<div class="clear"></div>'; $count=0; }
  48. endforeach; ?>
  49.  
  50. </div>
  51. <!-- END #home-projects -->
  52. <?php } ?>
  53.  
  54. <?php $contact_drop = new WP_Query('pagename=welcome'); while ($contact_drop->have_posts()) : $contact_drop->the_post(); $do_not_duplicate = $post->ID; ?>
  55. <div id="page-heading">
  56. <h1><?php the_title(); ?></h1>
  57. </div>
  58. <div class="entry clearfix">
  59. <?php the_content(); ?>
  60. </div>
  61. <?php endwhile; ?>
  62. <div class="home-wrap clearfix">
  63. <!-- Recent Portfolio Items -->
  64. <?php
  65. //get post type ==> portfolio
  66. global $post;
  67. $args = array(
  68. 'post_type' =>'portfolio',
  69. 'numberposts' => '6'
  70. );
  71. $portfolio_posts = get_posts($args);
  72. ?>
  73. <?php if($portfolio_posts) { ?>
  74.  
  75.  
  76. <div id="home-projects" class="clearfix">
  77.  
  78. <h2 class="home-projects-heading"><span><?php _e('Recent Projects','fotos'); ?></span></h2>
  79.  
  80. <?php
  81. $count=0;
  82. foreach($portfolio_posts as $post) : setup_postdata($post);
  83. $count++;
  84. //get portfolio thumbnail
  85. $thumbail = wp_get_attachment_image_src(get_post_thumbnail_id(), 'portfolio-thumb');
  86. ?>
  87.  
  88. <?php if ( has_post_thumbnail() ) { ?>
  89. <div class="portfolio-item <?php if($count == '3') { echo 'no-margin'; } ?>">
  90. <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><img src="<?php echo $thumbail[0]; ?>" height="<?php echo $thumbail[2]; ?>" width="<?php echo $thumbail[1]; ?>" alt="<?php echo the_title(); ?>" /></a>
  91. <div class="portfolio-item-details">
  92. <h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php echo the_title(); ?></a></h2>
  93. <?php echo excerpt('15'); ?>
  94. </div>
  95. </div>
  96. <?php } ?>
  97.  
  98. <?php
  99. if($count == '3') { echo '<div class="clear"></div>'; $count=0; }
  100. endforeach; ?>
  101.  
  102. </div>
  103. <!-- END #home-projects -->
  104. <?php } ?>
  105.  
  106.  
  107.  
  108. </div>
  109. <!-- END home-wrap -->
  110. <?php get_footer(' '); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement