<?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 home page when no home.php file exists.
 *
 * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
 *
 * @package errigal
 * @since 1.0.0
 */

defined( 'ABSPATH' ) || exit;

get_header();

if ( is_404() ) {
	get_template_part( 'template-parts/content/404' );
} elseif ( is_archive() ) {
	get_template_part( 'template-parts/content/archive' );
} elseif ( is_attachment() ) {
	get_template_part( 'template-parts/content/attachment' );
} elseif ( is_page() ) {
	get_template_part( 'template-parts/content/page' );
} elseif ( is_search() ) {
	get_template_part( 'template-parts/content/search' );
} elseif ( is_single() ) {
	get_template_part( 'template-parts/content/single' );
} else {
	get_template_part( 'template-parts/content/index' );
}

get_footer();
