page.php 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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
  7. * and that other 'pages' on your WordPress site may use a
  8. * different template.
  9. *
  10. * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
  11. *
  12. * @package spice-software
  13. */
  14. get_header();?>
  15. <section class="section-space page">
  16. <div class="container<?php echo esc_html(spice_software_container());?>">
  17. <div class="row">
  18. <?php
  19. if (class_exists('WooCommerce')) {
  20. if (is_account_page() || is_cart() || is_checkout()) {
  21. echo '<div class="col-lg-' . (!is_active_sidebar("woocommerce") ? "12" : "8" ) . ' col-md-' . (!is_active_sidebar("woocommerce") ? "12" : "7" ) . ' col-xs-12">';
  22. } else {
  23. echo '<div class="col-lg-' . (!is_active_sidebar("sidebar-1") ? "12" : "8" ) . ' col-md-' . (!is_active_sidebar("sidebar-1") ? "12" : "7" ) . ' col-xs-12">';
  24. }
  25. } else {
  26. echo '<div class="col-lg-' . (!is_active_sidebar("sidebar-1") ? "12" : "8" ) . ' col-md-' . (!is_active_sidebar("sidebar-1") ? "12" : "7" ) . ' col-xs-12">';
  27. }
  28. ?>
  29. <?php
  30. if (class_exists('WooCommerce')) {
  31. if (is_account_page() || is_cart() || is_checkout()) {
  32. while (have_posts()) : the_post();
  33. get_template_part('template-parts/content', 'page');
  34. if (comments_open() || get_comments_number()) :
  35. comments_template();
  36. endif;
  37. endwhile;
  38. } else {
  39. while (have_posts()) : the_post();
  40. get_template_part('template-parts/content', 'page');
  41. if (comments_open() || get_comments_number()) :
  42. comments_template();
  43. endif;
  44. endwhile;
  45. }
  46. } else {
  47. while (have_posts()) : the_post();
  48. get_template_part('template-parts/content', 'page');
  49. if (comments_open() || get_comments_number()) :
  50. comments_template();
  51. endif;
  52. endwhile;
  53. }
  54. ?>
  55. </div>
  56. <?php
  57. if (class_exists('WooCommerce')) {
  58. if (is_account_page() || is_cart() || is_checkout()) {
  59. get_sidebar('woocommerce');
  60. } else {
  61. get_sidebar();
  62. }
  63. } else {
  64. get_sidebar();
  65. }
  66. ?>
  67. </div>
  68. </section>
  69. <?php get_footer(); ?>