HEX
Server: LiteSpeed
System: Linux spg20.cloudpowerdns.com 5.14.0-611.35.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Feb 25 03:46:09 EST 2026 x86_64
User: carrerup (3153)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: /home/carrerup/.trash/techland/index.php
<?php
/**
* The main template file
*
* This is the most generic template file in a WordPress theme
* and one of the two required files for a theme (the other being style.css).
* It is used to display a page when nothing more specific matches a query.
* E.g., it puts together the home page when no home.php file exists.
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package WordPress
* @subpackage Techland
* @since 1.0.0
*/

get_header();

do_action( "techland_before_index" );

	$techland_justify = (stripos(techland_sidebar_control('index_layout'), 'nt-no-sidebar') !== false) ? ' justify-content-center' : '';

?>
<!-- container -->
<div id="nt-index" class="nt-index">

	<!-- Hero section - this function using on all inner pages -->
	<?php techland_hero_section(); ?>

    <?php
    if ( function_exists('techland_vc_print_saved_template') && '' != techland_settings( 'vc_before_index_templates' ) ) {
        echo techland_vc_print_saved_template( techland_settings( 'vc_before_index_templates' ) );
    }
     ?>

	<div class="nt-theme-inner-container section">
		<div class="container">
			<div class="row<?php echo esc_attr($techland_justify); ?>">

				<!-- left sidebar -->
				<?php
                if ( 'left-sidebar' == techland_settings( 'index_layout', 'right-sidebar' ) ) {
					get_sidebar();
				}
                ?>

				<!-- Sidebar column control -->
				<div  class="<?php echo techland_sidebar_control( 'index_layout' ); ?>">
					<?php

						if ( have_posts() ) {

							// masonry type
							if( 'masonry' == techland_settings( 'index_type', 'grid' ) ) {

								echo '<div class="row">';
								echo '<div id="masonry-container">';

							}
							$techland_inner_grid_style = '';
							if( 'grid' == techland_settings( 'index_type', 'grid' ) ) {
								$techland_inner_grid_style = techland_settings( 'grid_style', '1' );
								echo '<div class="posts posts--s'.esc_attr($techland_inner_grid_style).'">';
								echo '<div class="__inner">';
								echo '<div class="row">';

							}

								while ( have_posts() ) : the_post();

									// if there are posts, run techland_post function
									// contain supported post formats from theme
									if ('1' == $techland_inner_grid_style) {

										echo techland_post_style_one();

									} elseif ('2' == $techland_inner_grid_style) {

										echo techland_post_style_two();

									} elseif ('3' == $techland_inner_grid_style) {

										echo techland_post_style_three();

									} elseif ('4' == $techland_inner_grid_style) {

										echo techland_post_style_four();

									} else {

										techland_post();
									}

								endwhile;

							// masonry type container end
							if( 'masonry' == techland_settings( 'index_type', 'grid' ) ) {

								echo '</div>';
								echo '</div>';

							}
							// masonry type container end
							if( 'grid' == techland_settings( 'index_type', 'grid' ) ) {

								echo '</div>';
								echo '</div>';
								echo '</div>';

							}

							echo '<div class="clearfix"></div>';

							// this function working with wp reading settins + posts
							techland_index_loop_pagination();

						} else {

							// if there are no posts, read content none function
							techland_content_none();

						}

					?>
				</div>
				<!-- End sidebar column control -->

				<!-- right sidebar -->
				<?php
                if ( 'right-sidebar' == techland_settings( 'index_layout', 'right-sidebar' ) ) {
					 get_sidebar();
				}
                ?>

			</div>
			<!--End row -->
		</div>
		<!--End container -->
	</div>
	<!--End #blog -->
</div>
<!--End index general div -->

<?php

    if ( function_exists('techland_vc_print_saved_template') && '' != techland_settings( 'vc_after_index_templates' ) ) {
        echo techland_vc_print_saved_template( techland_settings( 'vc_after_index_templates' ) );
    }
	// you can use this action to add any content after index page
	do_action( "techland_after_index" );

	get_footer();

?>