Advertisement
Guest User

content.php

a guest
Mar 1st, 2013
33
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.43 KB | None | 0 0
  1. <?php include (get_template_directory() . '/buddypress/buddypress-globals.php'); ?>
  2. <?php if ( ! have_posts() ) : ?>
  3. <?php if($bp_existed == 'true') : ?>
  4. <?php do_action( 'bp_before_blog_post' ) ?>
  5. <?php endif; ?>
  6. <div id="post-0" class="post error404 not-found">
  7. <h1 class="post-title"><?php _e( 'Not Found', 'framemarket'); ?></h1>
  8. <div class="post-content">
  9. <p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'framemarket'); ?></p>
  10. <?php get_search_form(); ?>
  11. </div>
  12. </div>
  13. <?php endif; ?>
  14.  
  15. <?php while ( have_posts() ) : the_post(); ?>
  16. <?php if ( ( function_exists( 'get_post_format' ) && 'gallery' == get_post_format( $post->ID ) ) || in_category( _x( 'gallery', 'gallery category slug', 'framemarket') ) ) : ?>
  17. <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  18. <h2 class="post-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'framemarket'), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
  19.  
  20. <div class="post-meta">
  21. <?php framemarket_postedon(); ?>
  22. </div>
  23.  
  24. <div class="post-content">
  25. <?php if ( post_password_required() ) : ?>
  26. <?php the_content(); ?>
  27. <?php else : ?>
  28. <?php
  29. $images = get_children( array( 'post_parent' => $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'ASC', 'numberposts' => 999 ) );
  30. if ( $images ) :
  31. $total_images = count( $images );
  32. $image = array_shift( $images );
  33. $image_img_tag = wp_get_attachment_image( $image->ID, 'thumbnail' );
  34. ?>
  35. <div class="gallery-thumb">
  36. <a class="size-thumbnail" href="<?php the_permalink(); ?>"><?php echo $image_img_tag; ?></a>
  37. </div>
  38. <p><em><?php printf( _n( 'This gallery contains <a %1$s>%2$s photo</a>.', 'This gallery contains <a %1$s>%2$s photos</a>.', $total_images, 'framemarket'),
  39. 'href="' . get_permalink() . '" title="' . sprintf( esc_attr__( 'Permalink to %s', 'framemarket'), the_title_attribute( 'echo=0' ) ) . '" rel="bookmark"',
  40. number_format_i18n( $total_images )
  41. ); ?></em></p>
  42. <?php endif; ?>
  43. <?php the_excerpt(); ?>
  44. <?php endif; ?>
  45. </div>
  46.  
  47. <div class="post-info">
  48. <?php if ( function_exists( 'get_post_format' ) && 'gallery' == get_post_format( $post->ID ) ) : ?>
  49. <a href="<?php echo get_post_format_link( 'gallery' ); ?>" title="<?php esc_attr_e( 'View Galleries', 'framemarket'); ?>"><?php _e( 'More Galleries', 'framemarket'); ?></a>
  50. <span class="meta-sep">|</span>
  51. <?php elseif ( in_category( _x( 'gallery', 'gallery category slug', 'framemarket') ) ) : ?>
  52. <a href="<?php echo get_term_link( _x( 'gallery', 'gallery category slug', 'framemarket'), 'category' ); ?>" title="<?php esc_attr_e( 'View posts in the Gallery category', 'framemarket'); ?>"><?php _e( 'More Galleries', 'framemarket'); ?></a>
  53. <span class="meta-sep">|</span>
  54. <?php endif; ?>
  55. <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'framemarket'), __( '1 Comment', 'framemarket'), __( '% Comments', 'framemarket') ); ?></span>
  56. <?php edit_post_link( __( 'Edit', 'framemarket'), '<span class="meta-sep">|</span> <span class="edit-link">', '</span>' ); ?>
  57. </div>
  58. </div>
  59.  
  60. <?php elseif ( ( function_exists( 'get_post_format' ) && 'aside' == get_post_format( $post->ID ) ) || in_category( _x( 'asides', 'asides category slug', 'framemarket') ) ) : ?>
  61. <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  62.  
  63. <?php if ( is_archive() || is_search() ) : ?>
  64. <div class="entry-summary">
  65. <?php the_excerpt(); ?>
  66. </div>
  67. <?php else : ?>
  68. <div class="post-content">
  69. <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'framemarket') ); ?>
  70. </div>
  71. <?php endif; ?>
  72.  
  73. <div class="post-info">
  74. <?php framemarket_postedon(); ?>
  75. <span class="meta-sep">|</span>
  76. <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'framemarket'), __( '1 Comment', 'framemarket'), __( '% Comments', 'framemarket') ); ?></span>
  77. <?php edit_post_link( __( 'Edit', 'framemarket'), '<span class="meta-sep">|</span> <span class="edit-link">', '</span>' ); ?>
  78. </div>
  79. </div>
  80.  
  81. <?php else : ?>
  82. <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  83. <h2 class="post-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'framemarket'), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
  84.  
  85. <div class="post-meta">
  86. <?php framemarket_postedon(); ?>
  87. </div>
  88.  
  89. <?php if ( is_archive() || is_search() ) : ?>
  90. <div class="entry-summary">
  91. <?php the_excerpt(); ?>
  92. </div>
  93. <?php else : ?>
  94. <div class="post-content">
  95. <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'framemarket' ) ); ?>
  96. <?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'framemarket' ), 'after' => '</div>' ) ); ?>
  97. </div>
  98. <?php endif; ?>
  99.  
  100. <div class="post-info">
  101. <?php if ( count( get_the_category() ) ) : ?>
  102. <span class="cat-links">
  103. <?php printf( __( '<span class="%1$s">Posted in</span> %2$s', 'framemarket'), 'post-info-prep post-info-prep-cat-links', get_the_category_list( ', ' ) ); ?>
  104. </span>
  105. <span class="meta-sep">|</span>
  106. <?php endif; ?>
  107. <?php
  108. $tags_list = get_the_tag_list( '', ', ' );
  109. if ( $tags_list ):
  110. ?>
  111. <span class="tag-links">
  112. <?php printf( __( '<span class="%1$s">Tagged</span> %2$s', 'framemarket'), 'post-info-prep post-info-prep-tag-links', $tags_list ); ?>
  113. </span>
  114. <span class="meta-sep">|</span>
  115. <?php endif; ?>
  116. <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'framemarket'), __( '1 Comment', 'framemarket'), __( '% Comments', 'framemarket') ); ?></span>
  117. <?php edit_post_link( __( 'Edit', 'framemarket'), '<span class="meta-sep">|</span> <span class="edit-link">', '</span>' ); ?>
  118. </div>
  119. </div>
  120. <?php if($bp_existed == 'true') : ?>
  121. <?php do_action( 'bp_after_blog_post' ) ?>
  122. <?php endif; ?>
  123. <?php comments_template( '', true ); ?>
  124.  
  125. <?php endif; ?>
  126.  
  127. <?php endwhile; ?>
  128.  
  129. <?php if ( $wp_query->max_num_pages > 1 ) : ?>
  130. <div id="navigation-bottom" class="navigation">
  131. <?php wp_pagenavi(); ?>
  132. </div>
  133. <?php endif; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement