<?php
/**
 * The template for displaying Search page.
 *
 * @package my-sunset
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly.
}

get_header(); ?>

<?php
/**
 * sunset_before_site_main hook.
 */
do_action( 'sunset_before_site_main' );

?>

	<main class="site-main">

		<?php
		/**
		 * sunset_before_main_content hook.
		 *
		 * @hooked sunset_heading_title - 5
		 * @hooked sunset_before_content_tags - 10
		 * @hooked sunset_get_sidebar - 10
		 */
		do_action( 'sunset_before_main_content', 'blog' );

		if ( have_posts() ) :

			/**
			 * sunset_before_loop hook.
			 * @hooked sunset_loop_opening_tags - 10
			 */
			do_action( 'sunset_before_loop', 'blog' );

			while ( have_posts() ) :

				the_post();

				sunset_loop_post();

			endwhile;

			/**
			 * sunset_after_loop hook.
			 * 
			 * @hooked sunset_after_loop_extra_tags - 10
			 * @hooked sunset_pagination - 20
			 * @hooked sunset_content_closing_tags - 50
			 * 
			 */
			do_action( 'sunset_after_loop', 'blog' );

		else :

			get_template_part( 'none' );

		endif;

		/**
		 * sunset_after_main_content hook.
		 * 
		 * @hooked sunset_after_content_tags - 20
		 */
		do_action( 'sunset_after_main_content', 'blog' );
		?>

	</main>

<?php
/**
 * sunset_after_site_main hook.
 */
do_action( 'sunset_after_site_main' );

get_footer();
