Sindbad~EG File Manager

Current Path : /home/xiedrke/entrepot/wp-content/themes/realpro/
Upload File :
Current File : /home/xiedrke/entrepot/wp-content/themes/realpro/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://codex.wordpress.org/Template_Hierarchy
 *
 */

get_header();
/**
 * thim_wrapper_loop_start hook
 *
 * @hooked thim_wrapper_loop_start - 1
 * @hooked thim_wrapper_page_title - 5
 * @hooked thim_wrapper_loop_start - 30
 */

do_action( 'thim_wrapper_loop_start' );

do_action( 'thim_before_archive_loop' );

$posts_per_page = get_option('posts_per_page');
$offset = ($paged == 1) ? 4 : ($paged - 1) * $posts_per_page + 4;
$sort_option = isset($_GET['sort_by']) ? $_GET['sort_by'] : 'date';

$remaining_posts_args = array(
	'posts_per_page' => $posts_per_page,
	'offset'         => $offset,
	'paged'          => $paged,
	'orderby'        => $sort_option,
	'order'          => 'DESC',
);

$remaining_posts_query = new WP_Query($remaining_posts_args);

if ($remaining_posts_query->have_posts()) {
	?>
	<div class="filter-topbar d-flex flex-wrap">
		<div class="realpro-filter-search">
			<?php get_search_form(); ?>
		</div> 

		<form id="sort-posts-form" method="get" action="">
			<select name="sort_by" id="sort_by" onchange="document.getElementById('sort-posts-form').submit();">
				<option value="date" <?php selected($sort_option, 'date'); ?>>Latest</option>
				<option value="title" <?php selected($sort_option, 'title'); ?>>Title</option>
				<option value="comment_count" <?php selected($sort_option, 'comment_count'); ?>>Most popular</option>
			</select>
			<i class="rp-angle-down"></i>
		</form>
	</div>
	<div id="blog-archive" class="archive_switch row post-list" > 
		<?php
	while ($remaining_posts_query->have_posts()) : $remaining_posts_query->the_post();
		get_template_part('templates/template-parts/content');
	endwhile;
	?>
	</div>

	<?php
	thim_paging_nav();
} else {
	get_template_part('templates/template-parts/content', 'none');
}
wp_reset_postdata();

/**
 * thim_wrapper_loop_end hook
 *
 * @hooked thim_wrapper_loop_end - 10
 * @hooked thim_wrapper_div_close - 30
 */
do_action( 'thim_wrapper_loop_end' );

get_footer();

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists