Advertisement
Guest User

pph

a guest
Jul 12th, 2018
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.52 KB | None | 0 0
  1. <?php
  2. /**
  3. * The default template for displaying content
  4. *
  5. * Used for pages.
  6. *
  7. * @package Hestia
  8. * @since Hestia 1.0
  9. */
  10.  
  11. $hestia_page_sidebar_layout = get_theme_mod( 'hestia_page_sidebar_layout', 'full-width' );
  12. $individual_layout = get_post_meta( get_the_ID(), 'hestia_layout_select', true );
  13. if ( ! empty( $individual_layout ) && $individual_layout !== 'default' ) {
  14. $hestia_page_sidebar_layout = $individual_layout;
  15. }
  16.  
  17. $args = array(
  18. 'sidebar-right' => 'col-md-9 page-content-wrap',
  19. 'sidebar-left' => 'col-md-9 page-content-wrap',
  20. 'full-width' => 'col-md-8 col-md-offset-2 page-content-wrap',
  21. );
  22. $class_to_add = hestia_get_content_classes( $hestia_page_sidebar_layout, 'sidebar-1', $args );
  23. ?>
  24.  
  25. <article id="post-<?php the_ID(); ?>" class="section section-text">
  26. <div class="row">
  27. <?php
  28. if ( $hestia_page_sidebar_layout === 'sidebar-left' ) {
  29. hestia_get_sidebar();
  30. }
  31. ?>
  32. <div class="<?php echo esc_attr( $class_to_add ); ?>">
  33. <?php
  34. $hestia_header_layout = get_theme_mod( 'hestia_header_layout', 'default' );
  35. if ( ( $hestia_header_layout !== 'default' ) && ! ( hestia_woocommerce_check() && ( is_product() || is_cart() || is_checkout() ) ) ) {
  36. hestia_show_header_content( 'page', $hestia_header_layout );
  37. }
  38.  
  39. the_content();
  40. ?>
  41. </div>
  42. <?php
  43. if ( $hestia_page_sidebar_layout === 'sidebar-right' ) {
  44. hestia_get_sidebar();
  45. }
  46. ?>
  47. </div>
  48. </article>
  49. <?php
  50. if ( is_paged() ) {
  51. hestia_single_pagination();
  52. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement