Advertisement
icbi

front page template - news on top - not working

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