Advertisement
Guest User

Loop-single Ni

a guest
Dec 13th, 2014
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.14 KB | None | 0 0
  1. <?php
  2. global $graphene_settings;
  3. $post_type = get_post_type_object( get_post_type() );
  4. ?>
  5. <?php
  6. /**
  7. * Check if the post has a post format. Load a post-format specific loop file,
  8. * if it has. Continue with standard loop otherwise.
  9. */
  10. if ( function_exists( 'get_post_format' ) ) {
  11. global $post_format;
  12. $post_format = get_post_format();
  13.  
  14. // Get the post formats supported by the theme
  15. $supported_formats = get_theme_support( 'post-formats' );
  16. if ( is_array( $supported_formats ) ) $supported_formats = $supported_formats[0];
  17.  
  18. if ( in_array( $post_format, $supported_formats ) ) {
  19.  
  20. // Get the post format loop file
  21. get_template_part( 'loop-post-formats', $post_format );
  22.  
  23. // Stop this default posts loop
  24. return;
  25. }
  26. }
  27. ?>
  28.  
  29. <?php /* Post navigation */ ?>
  30. <?php graphene_post_nav(); ?>
  31.  
  32. <div id="post-<?php the_ID(); ?>" <?php post_class( 'clearfix post' ); ?>>
  33.  
  34. <?php do_action( 'graphene_before_post' ); ?>
  35.  
  36. <div class="entry clearfix">
  37.  
  38. <?php /* Post date */ ?>
  39. <?php if ( stristr( graphene_post_date_setting( get_the_ID() ), 'icon' ) ) graphene_post_date(); ?>
  40.  
  41. <?php /* Show the post author's gravatar if enabled */
  42. if ( $graphene_settings['show_post_avatar'] ) {
  43. echo '<div class="post-avatar-wrap gutter-left">' . get_avatar( get_the_author_meta( 'user_email' ), 45 ) . '</div>';
  44. }
  45. ?>
  46.  
  47. <?php
  48. /* Add a print button only for single pages/posts
  49. * and if the theme option is enabled.
  50. */
  51. if ( $graphene_settings['print_button'] ) : ?>
  52. <?php graphene_print_button( $post_type ); ?>
  53. <?php endif; ?>
  54.  
  55. <?php /* Add an email post icon if the WP-Email plugin is installed and activated */
  56. if( function_exists( 'wp_email' ) ) { echo '<p class="email wp-email-button">'; email_link(); echo '</p>'; }
  57. ?>
  58.  
  59. <?php /* Post title */ ?>
  60. <h1 class="post-title entry-title">
  61. <?php if ( get_the_title() == '' ) { _e( '(No title)', 'graphene' ); } else { the_title(); } ?>
  62. <?php do_action( 'graphene_post_title' ); ?>
  63. </h1>
  64.  
  65. <?php /* Post meta */ ?>
  66. <div class="post-meta clearfix">
  67.  
  68. <?php /* Post category, not shown if admin decides to hide it */ ?>
  69. <?php if ( ( $graphene_settings['hide_post_cat'] != true ) ) : ?>
  70. <span class="printonly"><?php _e( 'Categories:', 'graphene' ); ?> </span>
  71. <p class="meta_categories"><?php the_category( ", " ); ?></p>
  72. <?php endif; ?>
  73.  
  74. <?php /* Edit post link, if user is logged in */ ?>
  75. <?php if ( is_user_logged_in() ) : ?>
  76. <p class="edit-post">
  77. <?php edit_post_link( sprintf( __( 'Edit %s', 'graphene' ), $post_type->labels->singular_name ), ' (', ')' ); ?>
  78. </p>
  79. <?php endif; ?>
  80.  
  81. <?php /* Microdata field for "Updated" */ ?>
  82. <?php if ( ! graphene_should_show_date() ) : ?>
  83. <span class="updated"><span class="value-title" title="<?php the_time( 'Y-m-d\TH:i' ); ?>" /></span>
  84. <?php endif; ?>
  85.  
  86. <?php /* Inline post date */ ?>
  87. <?php if ( graphene_post_date_setting( get_the_ID() ) == 'text' ) graphene_post_date(); ?>
  88.  
  89. <?php /* Post author, not shown if admin decides to hide it */ ?>
  90. <?php if ( $graphene_settings['hide_post_author'] != true ) : ?>
  91. <p class="post-author author vcard">
  92. <?php
  93. /* translators: this is for the author byline, such as 'by John Doe' */
  94. $author_url = '<a href="' . get_author_posts_url( get_the_author_meta( 'ID' ) ) . '" class="url">' . get_the_author_meta( 'display_name' ) . '</a>';
  95. printf( __( 'by %s', 'graphene' ), '<span class="fn nickname">' . apply_filters( 'graphene_author_url', $author_url ) . '</span>' );
  96. ?>
  97. </p>
  98. <?php endif; ?>
  99.  
  100. <?php /* For printing: the date of the post */
  101. if ( $graphene_settings['print_css'] && graphene_should_show_date() ) {
  102. echo graphene_print_only_text( '<em>' . get_the_time( get_option( 'date_format' ) ) . '</em>' );
  103. }
  104. ?>
  105.  
  106. <?php do_action( 'graphene_post_meta' ); ?>
  107. </div>
  108.  
  109. <?php /* Post content */ ?>
  110. <div class="entry-content clearfix">
  111. <?php do_action( 'graphene_before_post_content' ); ?>
  112.  
  113. <?php /* Social sharing buttons at top of post */ ?>
  114. <?php if ( stripos( $graphene_settings['addthis_location'], 'top' ) !== false ) { graphene_addthis( get_the_ID() ); } ?>
  115.  
  116. <?php /* The full content */ ?>
  117. <?php the_content(); ?>
  118.  
  119. <?php wp_link_pages( array( 'before' => '<div class="link-pages"><p><strong>' . __( 'Pages:','graphene' ) . '</strong> ', 'after' => '</p></div>', 'next_or_number' => 'number' ) ); ?>
  120.  
  121. <?php do_action( 'graphene_after_post_content' ); ?>
  122.  
  123. </div>
  124.  
  125. <?php /* Post footer */ ?>
  126. <div class="entry-footer clearfix">
  127. <?php /* Display the post's tags, if there is any */ ?>
  128. <?php if ( $graphene_settings['hide_post_tags'] != true ) : ?>
  129. <p class="post-tags"><?php if ( has_tag() ) { _e( 'Tags:','graphene' ); the_tags( ' ', ', ', '' ); } else { _e( 'This post has no tag','graphene' ); } ?></p>
  130. <?php endif; ?>
  131.  
  132. <?php
  133. /* Display AddThis social sharing button */
  134. if ( stripos( $graphene_settings['addthis_location'], 'bottom' ) !== false) { graphene_addthis( get_the_ID() ); }
  135. ?>
  136.  
  137. <?php do_action( 'graphene_post_footer' ); ?>
  138. </div>
  139. </div>
  140.  
  141. <iframe style="border:none; overflow:hidden; margin-top:10px; width:620px; height:350px;" frameborder="0" scrolling="no" src="http://ocioso.com.br/troca-de-links/tag/id/dBr_CJlbZCd0vKSHGNfE7GYl8CfDBexs2GbknO5J6Gmm8ididJwL311Ohg8DY6W6Wuj_0-zHEP_jABcG9zRNzdm13z9d_6pH8ikeYPMeIc80siTSNGwq8MoIX4bRFlRLZOknhPN-KlzvijG3yfZHCdbaeuaaMOU0JwBvKuOyXW5hPvEL39LbHcwo__d7lw7s9z-rOqPTrgOUaIvR2hZHnxG7c7y_BGa7XucCVgIcdYi36cqSgvCUkacTFbbiduvA|f5a0L81fknbdTBtB37dENquJupWVZmvvZifGmSDUL_w="></iframe>
  142.  
  143. </div>
  144.  
  145. <?php
  146. /**
  147. * Display the post author's bio in single-post page if enabled
  148. */
  149. if ( $graphene_settings['show_post_author'] ) :
  150. ?>
  151. <h4 class="author_h4 vcard"><?php _e( 'About the author', 'graphene' ); ?></h4>
  152. <div class="author-info clearfix">
  153. <div <?php graphene_grid( 'author-avatar-wrap', 2, 2, 2, true ); ?>>
  154. <?php
  155. if ( $author_imgurl = get_the_author_meta( 'graphene_author_imgurl' ) ) {
  156. echo '<img class="avatar" src="' . $author_imgurl . '" alt="" />';
  157. } else {
  158. echo get_avatar( get_the_author_meta( 'user_email' ), graphene_grid_width( '', 2 ) );
  159. }
  160. ?>
  161. </div>
  162. <p class="author_name"><strong><?php the_author_meta( 'display_name' ); ?></strong></p>
  163. <div class="author_bio"><?php echo wpautop( get_the_author_meta( 'description' ) ); ?></div>
  164.  
  165. </div>
  166. <?php endif; ?>
  167.  
  168. <?php /* For printing: the permalink */
  169. if ( $graphene_settings['print_css'] ) {
  170. echo graphene_print_only_text( '<span class="printonly url"><strong>' . __( 'Permanent link to this article:', 'graphene' ) . ' </strong><span>' . get_permalink() . '</span></span>' );
  171. }
  172. ?>
  173.  
  174. <?php
  175. /**
  176. * Display Adsense advertising for single post pages
  177. * See graphene_adsense() function in functions.php
  178. */
  179. graphene_adsense(); ?>
  180.  
  181. <?php /* Get the comments template for single post pages */ ?>
  182. <?php comments_template(); ?>
  183.  
  184. <?php do_action( 'graphene_loop_footer' ); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement