Advertisement
Guest User

Untitled

a guest
Mar 16th, 2011
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.75 KB | None | 0 0
  1. <?php
  2. /*
  3. Template Name: NO TITLE DIY
  4. */
  5. ?><?php
  6. <?php
  7. //get options from theme panel
  8. global $options;
  9. foreach ($options as $value) {
  10. if (get_settings( $value['id'] ) === FALSE) { $$value['id'] = $value['std']; } else { $$value['id'] = get_settings( $value['id'] ); }
  11. }
  12. ?>
  13. <?php get_header(''); ?>
  14. <div id="xs-home-wrap">
  15. <? if ($xs_disable_slider == "true") { ?>
  16. <?php } elseif (is_front_page()) {?>
  17. <?php include (TEMPLATEPATH . '/sliders/nivoslider.php'); ?>
  18. <? } else { ?>
  19. <?php } ?>
  20.  
  21. <div id="xs-homepage-text">
  22. <?php query_posts(array(
  23. 'post_type'=>'home_text'
  24. ));
  25. ?>
  26. <?php if ( have_posts() ) while ( have_posts() ) : the_post();?>
  27. <?php the_content(); ?>
  28. <?php endwhile; ?>
  29. </div><!-- /xs-homepage-text -->
  30.  
  31. <div id="xs-homepage-boxes">
  32. <?php query_posts(array(
  33. 'post_type'=>'home_boxes',
  34. 'posts_per_page' => -1,
  35. 'orderby' => 'post_date'
  36. ));
  37. ?>
  38. <?php if ( have_posts() ) while ( have_posts() ) : the_post(); $thumbnail = wp_get_attachment_image_src(get_post_thumbnail_id(), 'large'); ?>
  39. <div class="xs-homepage-box">
  40. <h2><?php the_title() ?></h2>
  41. <?php if ($xs_enable_timthumb == "true") { ?>
  42. <img src="<?php bloginfo('template_directory'); ?>/timthumb/timthumb.php?src=<?php echo $thumbnail[0]; ?>&amp;h=150&amp;w=280" height="150" width="280" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
  43. <?php } else { ?>
  44. <img src="<?php echo $thumbnail[0]; ?>" height="150" width="280" title="<?php the_title(); ?>" />
  45. <?php } ?>
  46. <?php the_content(); ?>
  47. </div><!-- /xs-homepage-box -->
  48. <?php endwhile; ?>
  49. </div><!-- /xs-homepage-boxes -->
  50.  
  51. </div><!-- /xs-home-wrap-->
  52. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement