Guest User

single.php

a guest
Apr 21st, 2020
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.05 KB | None | 0 0
  1. <?php
  2. /**
  3. * The template for displaying all pages
  4. *
  5. * This is the template that displays all pages by default.
  6. * Please note that this is the WordPress construct of pages and that other
  7. * 'pages' on your WordPress site will use a different template.
  8. *
  9. */
  10.  
  11. get_header(); ?>
  12.  
  13. <?php
  14.  
  15. // Get content width and sidebar position
  16. $content_class = woodmart_get_content_class();
  17.  
  18. ?>
  19.  
  20.  
  21. <div class="site-content <?php echo esc_attr( $content_class ); ?>" role="main">
  22.  
  23. <?php /* The loop */ ?>
  24. <?php while ( have_posts() ) : the_post(); ?>
  25.  
  26. <?php get_template_part( 'content', get_post_format() ); ?>
  27.  
  28.  
  29. <div class="woodmart-single-footer"><?php if( get_the_tag_list( '', ', ' ) ): ?>
  30. <div class="single-meta-tags">
  31. <span class="tags-title"><?php esc_html_e('Tags', 'woodmart'); ?>:</span>
  32. <div class="tags-list">
  33. <?php echo get_the_tag_list( '', ', ' ); ?>
  34. </div>
  35. </div>
  36. <?php endif; ?><?php if ( woodmart_get_opt( 'blog_share' ) && woodmart_is_social_link_enable( 'share' ) ): ?>
  37. <div class="single-post-social">
  38. <?php if( function_exists( 'woodmart_shortcode_social' ) ) echo woodmart_shortcode_social(array('type' => 'share', 'tooltip' => 'yes', 'style' => 'colored')) ?>
  39. </div>
  40. <?php endif ?></div>
  41.  
  42. <?php if ( woodmart_get_opt( 'blog_navigation' ) ) woodmart_posts_navigation(); ?>
  43.  
  44. <?php
  45.  
  46. if ( woodmart_get_opt( 'blog_related_posts' ) ) {
  47. $args = woodmart_get_related_posts_args( $post->ID );
  48.  
  49. $query = new WP_Query( $args );
  50.  
  51. if( function_exists( 'woodmart_generate_posts_slider' ) ) echo woodmart_generate_posts_slider(array(
  52. 'title' => esc_html__('Related Posts', 'woodmart'),
  53. 'blog_design' => 'carousel',
  54. 'blog_carousel_design' => 'masonry',
  55. 'el_class' => 'related-posts-slider',
  56. 'slides_per_view' => 2
  57. ), $query);
  58. }
  59.  
  60. ?>
  61.  
  62. <?php comments_template(); ?>
  63.  
  64. <?php endwhile; ?>
  65.  
  66. </div><!-- .site-content -->
  67.  
  68. <?php get_sidebar(); ?>
  69.  
  70. <?php get_footer(); ?>
Add Comment
Please, Sign In to add comment