index.php 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?php
  2. /**
  3. * The main template file
  4. *
  5. * This is the most generic template file in a WordPress theme
  6. * and one of the two required files for a theme (the other being style.css).
  7. * It is used to display a page when nothing more specific matches a query.
  8. * E.g., it puts together the home page when no home.php file exists.
  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 blog">
  16. <div class="container<?php echo esc_html(spice_software_blog_post_container());?>">
  17. <div class="row">
  18. <?php
  19. if ( is_active_sidebar( 'sidebar-1' ) ):
  20. echo '<div class="col-lg-8 col-md-7 col-sm-12 standard-view">';
  21. else:
  22. echo '<div class="col-lg-12 col-md-12 col-sm-12 standard-view">';
  23. endif;
  24. if (have_posts()):
  25. while (have_posts()): the_post();
  26. if(! function_exists( 'spice_software_plus_activate' ) ){
  27. get_template_part( 'template-parts/content');
  28. }
  29. else{
  30. if(get_theme_mod('post_nav_style_setting','pagination')=='pagination'):
  31. include(SPICE_SOFTWAREP_PLUGIN_DIR.'/inc/template-parts/content.php' );
  32. endif;
  33. }
  34. endwhile;
  35. else:
  36. get_template_part('template-parts/content', 'none');
  37. endif;
  38. // pagination
  39. if ( ! function_exists( 'spice_software_plus_activate' ) ){
  40. do_action('spice_software_post_navigation');
  41. }else{
  42. do_action('spice_software_plus_post_navigation');
  43. }
  44. // pagination
  45. ?>
  46. </div>
  47. <?php get_sidebar();?>
  48. </div>
  49. </div>
  50. </section>
  51. <?php get_footer(); ?>