Advertisement
Guest User

cc-image-atachment page

a guest
Aug 16th, 2012
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.74 KB | None | 0 0
  1. <?php
  2. //image attachment template for custom community theme
  3. get_header(); ?>
  4.  
  5. <div id="content">
  6. <div class="padder-attachment">
  7. <?php do_action( 'bp_before_attachment' ) ?>
  8.  
  9. <div class="page" id="attachments-page">
  10.  
  11. <h2 class="pagetitle"><?php _e( '', 'buddypress' ) ?></h2>
  12.  
  13.  
  14. <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21. <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  22.  
  23.  
  24.  
  25.  
  26.  
  27. <div class="entry-meta">
  28.  
  29.  
  30. </div><!-- .entry-meta -->
  31.  
  32.  
  33.  
  34. <div class="entry-content">
  35.  
  36.  
  37.  
  38. <div class="entry-attachment">
  39.  
  40.  
  41. <a<?php if( wp_attachment_is_image() ) : ?>
  42.  
  43.  
  44. <href="<?php echo wp_get_attachment_url(); ?>" title="<?php the_title_attribute(); ?>" rel="attachment">
  45.  
  46.  
  47.  
  48. <?php
  49. $attachment_width = apply_filters( 'twentyten_attachment_size', 550);
  50. $attachment_height = apply_filters( 'twentyten_attachment_height', 550 );
  51. echo wp_get_attachment_image( $post->ID, array( $attachment_width, $attachment_height ) ); // filterable image width with, essentially, no limit for image height.
  52. ?></a>
  53.  
  54. <?php else : ?>
  55. <?php echo basename( get_permalink() ); ?>
  56. <?php endif; ?>
  57. </a>
  58. </div><!-- .entry-attachment -->
  59.  
  60.  
  61. <div class="entry-caption"><?php if ( !empty( $post->post_excerpt ) ) the_excerpt(); ?></div>
  62. </br>
  63. <div class="attachment-title">
  64. <p class="entry-title"><?php the_title(); ?></p>
  65. </div>
  66.  
  67.  
  68. <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyten' ) ); ?>
  69. <?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten' ), 'after' => '</div>' ) ); ?>
  70.  
  71. </div><!-- .entry-content -->
  72.  
  73.  
  74.  
  75.  
  76.  
  77. <div id="attachment-nav">
  78.  
  79.  
  80.  
  81.  
  82.  
  83. <div class="nav-next"><?php next_image_link();?> </div>
  84. <div class="nav-previous"><?php previous_image_link(); ?> </div>
  85.  
  86.  
  87.  
  88.  
  89. <div class="clear"></div>
  90. </div><!-- #attachment-nav -->
  91.  
  92.  
  93.  
  94.  
  95.  
  96. <div class="clear"></div>
  97.  
  98.  
  99. <?php if ( ! empty( $post->post_parent ) ) : ?>
  100. <p class="page-title"><a href="<?php echo get_permalink( $post->post_parent ); ?>" title="<?php esc_attr( printf( __( 'Return to %s', 'twentyten' ), get_the_title( $post->post_parent ) ) ); ?>" rel="gallery"><?php
  101. /* translators: %s - title of parent post */
  102. printf( __( '<span class="meta-nav">&larr;</span> %s', 'twentyten' ), get_the_title( $post->post_parent ) );
  103. ?></a></p>
  104. <?php endif; ?>
  105.  
  106.  
  107.  
  108.  
  109. </div><!-- #post-## -->
  110.  
  111.  
  112.  
  113.  
  114. <?/*php comments_template(); */?>
  115.  
  116.  
  117.  
  118. <?php endwhile; ?>
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126. </div><!--- #padder -->
  127.  
  128.  
  129. </div><!-- #content -->
  130. </div><!-- #container -->
  131.  
  132.  
  133.  
  134.  
  135. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement