Advertisement
baileyph

Main Index Template (index.php)

Mar 21st, 2011
581
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.32 KB | None | 0 0
  1. <?php
  2. /**
  3. * @package WordPress
  4. * @subpackage Fusion
  5. */
  6. ?>
  7. <?php get_header(); ?>
  8.  
  9. <div id="mid-content">
  10. <?php if ( have_posts() ) : ?>
  11.  
  12. <?php while ( have_posts() ) : the_post(); ?>
  13.  
  14. <!-- post -->
  15. <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  16. <h3 class="title"><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php printf( esc_attr__( 'Permalink to %s', 'fusion' ), the_title_attribute( 'echo=0' ) ); ?>"><?php the_title(); ?></a></h3>
  17.  
  18. <div class="postheader">
  19.  
  20. <div class="postinfo">
  21. <p><?php printf( __( 'Posted by %s in %s on %s', 'fusion' ),'<a href="'. get_author_posts_url( get_the_author_meta('ID') ) .'" title="'. sprintf( __( 'Posts by %s', 'fusion'), esc_attr( get_the_author() ) ).' ">'. get_the_author() .'</a>', get_the_category_list( ', ' ), get_the_time( get_option( 'date_format' ) ) ); ?> <?php edit_post_link( __( 'Edit', 'fusion' ), '| ', '' ); ?></p>
  22. </div>
  23.  
  24. </div>
  25.  
  26. <div class="postbody entry clearfix">
  27. <?php fusion_current_post_length(); ?>
  28. <?php wp_link_pages( array( 'before' => '<p class="postpages"><strong>Pages: </strong> ', 'after' => '</p>', 'next_or_number' => 'number' ) ); ?>
  29. </div>
  30.  
  31. <?php
  32. $posttags = get_the_tags();
  33. if ($posttags) { ?>
  34. <p class="tags"><?php the_tags( '' ); ?></p>
  35. <?php } ?>
  36. <p class="postcontrols">
  37. <?php
  38. global $id, $comment;
  39. $number = get_comments_number( $id );
  40. ?>
  41.  
  42. <a class="<?php if ( $number<1 ) { echo 'no '; }?>comments" href="<?php comments_link(); ?>"><?php comments_number( __( 'Leave a Comment', 'fusion' ), __( '1 Comment', 'fusion' ), __( '% Comments', 'fusion' ) ); ?></a>
  43. </p>
  44.  
  45. <div class="clear"></div>
  46.  
  47. </div>
  48. <!-- /post -->
  49.  
  50. <?php endwhile; ?>
  51.  
  52. <div class="navigation" id="pagenavi">
  53.  
  54. <div class="alignleft"><?php next_posts_link( __( '&laquo; Older Entries', 'fusion' ) ); ?></div>
  55. <div class="alignright"><?php previous_posts_link( __( 'Newer Entries &raquo;', 'fusion' ) ); ?></div>
  56.  
  57. <div class="clear"></div>
  58.  
  59. </div>
  60.  
  61. <?php else : ?>
  62.  
  63. <h2><?php _e( 'Not Found', 'fusion'); ?></h2>
  64. <p class="error"><?php _e( "Sorry, but you are looking for something that isn't here.", "fusion"); ?></p>
  65.  
  66. <?php get_search_form(); ?>
  67.  
  68. <?php endif; ?>
  69. </div>
  70. <!-- mid content -->
  71.  
  72. </div>
  73. <!-- /mid -->
  74.  
  75. <?php get_sidebar(); ?>
  76.  
  77. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement