LadyStarDust10

Untitled

Apr 13th, 2017
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.09 KB | None | 0 0
  1. <?php
  2.  
  3. get_header();
  4.  
  5. $show_default_title = get_post_meta( get_the_ID(), '_et_pb_show_title', true );
  6.  
  7. $is_page_builder_used = et_pb_is_pagebuilder_used( get_the_ID() );
  8.  
  9. ?>
  10.  
  11. <div id="main-content">
  12. <div class="container">
  13. <div id="content-area" class="clearfix">
  14. <div id="left-area">
  15. <?php while ( have_posts() ) : the_post(); ?>
  16. <?php if (et_get_option('divi_integration_single_top') <> '' && et_get_option('divi_integrate_singletop_enable') == 'on') echo(et_get_option('divi_integration_single_top')); ?>
  17. <article id="post-<?php the_ID(); ?>" <?php post_class( 'et_pb_post' ); ?>>
  18. <?php if ( ( 'off' !== $show_default_title && $is_page_builder_used ) || ! $is_page_builder_used ) { ?>
  19. <div class="et_post_meta_wrapper">
  20. <h1 class="entry-title"><?php the_title();?> </h1>
  21.  
  22. <!-- CODIGO ACRESCENTADO -->
  23. <div class="botao">
  24. <div class="addthis_toolbox addthis_default_style">
  25. <a class="addthis_button_facebook"></a>
  26. <a class="addthis_button_twitter" data-via="vinyanalista"></a>
  27. <a class="addthis_button_google_plusone_share"></a>
  28. <a class="addthis_button_favorites"></a>
  29. <a class="addthis_button_compact"></a>
  30. <a class="addthis_counter addthis_bubble_style"></a>
  31. </div></div>
  32. <!-- FIM DO CODIGO ACRESCENTADO -->
  33.  
  34.  
  35.  
  36.  
  37. <?php
  38. if ( ! post_password_required() ) :
  39.  
  40. et_divi_post_meta();
  41.  
  42. $thumb = '';
  43.  
  44. $width = (int) apply_filters( 'et_pb_index_blog_image_width', 1080 );
  45.  
  46. $height = (int) apply_filters( 'et_pb_index_blog_image_height', 675 );
  47. $classtext = 'et_featured_image';
  48. $titletext = get_the_title();
  49. $thumbnail = get_thumbnail( $width, $height, $classtext, $titletext, $titletext, false, 'Blogimage' );
  50. $thumb = $thumbnail["thumb"];
  51.  
  52. $post_format = et_pb_post_format();
  53.  
  54. if ( 'video' === $post_format && false !== ( $first_video = et_get_first_video() ) ) {
  55. printf(
  56. '<div class="et_main_video_container">
  57. %1$s
  58. </div>',
  59. $first_video
  60. );
  61. } else if ( ! in_array( $post_format, array( 'gallery', 'link', 'quote' ) ) && 'on' === et_get_option( 'divi_thumbnails', 'on' ) && '' !== $thumb ) {
  62. print_thumbnail( $thumb, $thumbnail["use_timthumb"], $titletext, $width, $height );
  63. } else if ( 'gallery' === $post_format ) {
  64. et_pb_gallery_images();
  65. }
  66. ?>
  67.  
  68. <?php
  69. $text_color_class = et_divi_get_post_text_color();
  70.  
  71. $inline_style = et_divi_get_post_bg_inline_style();
  72.  
  73. switch ( $post_format ) {
  74. case 'audio' :
  75. printf(
  76. '<div class="et_audio_content%1$s"%2$s>
  77. %3$s
  78. </div>',
  79. esc_attr( $text_color_class ),
  80. $inline_style,
  81. et_pb_get_audio_player()
  82. );
  83.  
  84. break;
  85. case 'quote' :
  86. printf(
  87. '<div class="et_quote_content%2$s"%3$s>
  88. %1$s
  89. </div> <!-- .et_quote_content -->',
  90. et_get_blockquote_in_content(),
  91. esc_attr( $text_color_class ),
  92. $inline_style
  93. );
  94.  
  95. break;
  96. case 'link' :
  97. printf(
  98. '<div class="et_link_content%3$s"%4$s>
  99. <a href="%1$s" class="et_link_main_url">%2$s</a>
  100. </div> <!-- .et_link_content -->',
  101. esc_url( et_get_link_url() ),
  102. esc_html( et_get_link_url() ),
  103. esc_attr( $text_color_class ),
  104. $inline_style
  105. );
  106.  
  107. break;
  108. }
  109.  
  110. endif;
  111. ?>
  112. </div> <!-- .et_post_meta_wrapper -->
  113. <?php } ?>
  114.  
  115. <div class="entry-content">
  116. <?php
  117. do_action( 'et_before_content' );
  118.  
  119. the_content();
  120.  
  121. wp_link_pages( array( 'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'Divi' ), 'after' => '</div>' ) );
  122. ?>
  123. </div> <!-- .entry-content -->
  124. <div class="et_post_meta_wrapper">
  125. <?php
  126. if ( et_get_option('divi_468_enable') == 'on' ){
  127. echo '<div class="et-single-post-ad">';
  128. if ( et_get_option('divi_468_adsense') <> '' ) echo( et_get_option('divi_468_adsense') );
  129. else { ?>
  130. <a href="<?php echo esc_url(et_get_option('divi_468_url')); ?>"><img src="<?php echo esc_attr(et_get_option('divi_468_image')); ?>" alt="468" class="foursixeight" /></a>
  131. <?php }
  132. echo '</div> <!-- .et-single-post-ad -->';
  133. }
  134. ?>
  135.  
  136. <?php if (et_get_option('divi_integration_single_bottom') <> '' && et_get_option('divi_integrate_singlebottom_enable') == 'on') echo(et_get_option('divi_integration_single_bottom')); ?>
  137.  
  138. <?php
  139. if ( ( comments_open() || get_comments_number() ) && 'on' == et_get_option( 'divi_show_postcomments', 'on' ) ) {
  140. comments_template( '', true );
  141. }
  142. ?>
  143. </div> <!-- .et_post_meta_wrapper -->
  144. </article> <!-- .et_pb_post -->
  145.  
  146. <?php endwhile; ?>
  147. </div> <!-- #left-area -->
  148.  
  149. <?php get_sidebar(); ?>
  150. </div> <!-- #content-area -->
  151. </div> <!-- .container -->
  152. </div> <!-- #main-content -->
  153.  
  154. <?php get_footer(); ?>
Add Comment
Please, Sign In to add comment