Advertisement
icbi

front page template

Apr 6th, 2011
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.30 KB | None | 0 0
  1. <?php
  2. /*
  3. Template Name: Front Page
  4. */
  5.  
  6. //Display the header
  7. get_header();?>
  8.  
  9. <div id="container">
  10.             <div id="content" role="main">
  11.  
  12. <?php
  13. /*code to display slideshow*/
  14. get_a_post(211); ?>
  15. <?php the_content(); ?>
  16.  
  17. <?php
  18. if ( is_active_sidebar( 'my-widget-areaa' )) {
  19.   dynamic_sidebar( 'my-widget-area' );
  20. }
  21. ?>
  22.  
  23.     <?php
  24. $sticky = get_option('sticky_posts');
  25. rsort( $sticky );
  26. $sticky = array_slice( $sticky, 0, 2);
  27. query_posts( array( 'post__in' => $sticky, 'caller_get_posts' => 2 ) );
  28. if (have_posts()) : while (have_posts()) : the_post();?>
  29.         <h2 class="entry-title"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2>
  30. <div class="entry">
  31. <?php the_content(); ?>
  32. </div>
  33.  
  34.    <?php endwhile; ?>
  35. <?php endif; ?>
  36.  
  37.  
  38.  
  39. <?php
  40. /*code to display most recent news article*/
  41.     query_posts('showposts=1&cat=3');
  42.     while(have_posts()) : the_post();
  43.     ?>
  44. <h2 class="entry-title"><?php the_category(3); ?></h2>
  45.     <h2 class="entry-title"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2>
  46. <div class="entry">
  47. <?php the_excerpt(); ?>
  48. </div>
  49.  
  50. <?php endwhile; ?>
  51.  
  52.             </div><!-- #content -->
  53.         </div><!-- #container -->
  54.  
  55. <?php get_sidebar();
  56. //Display sidebar
  57. ?>
  58.  
  59. <?php get_footer();
  60. //Display the footer
  61. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement