<?php
/**
 *  Shuffle filter view file
 *
 * This template can be overridden by copying it to yourtheme/smart-post-show-pro/templates/filter.php
 *
 * @package    Smart_Post_Show_Pro
 * @subpackage Smart_Post_Show_Pro/public/template
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}
?>
<div id="pcp_wrapper-<?php echo esc_attr( $smart_show_id ); ?>" class="<?php self::pcp_wrapper_classes( $layout_preset, $smart_show_id, $pagination_type, $item_same_height_class ); ?>" data-sid="<?php echo esc_attr( $smart_show_id ); ?>" <?php self::wrapper_data( $pagination_type, $pagination_type_mobile, $smart_show_id ); ?> data-grid="<?php echo esc_attr( $grid_style ); ?>" data-lang="<?php echo esc_attr( $spsp_lang ); ?>" data-current_post_id="<?php the_ID(); ?>">
<?php
	SP_PCP_HTML::pcp_section_title( $section_title, $show_section_title );
	SP_PCP_HTML::pcp_preloader( $show_preloader );
	$categories = get_categories(
		array(
			'orderby' => 'name',
			'parent'  => 0,
		)
	);
	if ( is_array( $advanced_filter ) && ! $pcp_query->is_main_query() ) {
		?>
	<div class="pcp-shuffle-filter">
		<?php
		$filter_type = isset( $view_options['pcp_filter_type'] ) ? $view_options['pcp_filter_type'] : '';
		SP_PCP_Shuffle_Filter::pcp_shuffle_filter( $view_options, $layout_preset, $pcp_query, $filter_type );
		?>
	</div>
<?php } ?>
	<div class="sp-pcp-row sp-pcp-grid">
		<?php self::pcp_get_posts( $options, $layout, $post_content_sorter, $pcp_query, $smart_show_id ); ?>
	</div>
	<?php require SP_PCP_Functions::pcp_locate_template( 'pagination.php' ); ?>
</div>
