<?php 
/**
 * The template for displaying a tag page
 *
 * @package WordPress
 * @subpackage Edition
 * @since Edition 1.0
 */
get_header(); 

global $fields_installed; // If ACF is installed

$tag 			= get_term_by( 'slug', get_query_var( 'tag' ), 'post_tag' ); 			// Get category ID
$background_url = $fields_installed ? get_field( 'custom_category_image', 'post_tag_' . $tag->term_id ) : '';	// Get background url
$custom_layout 	= $fields_installed ? get_field('cat_custom_page', 'post_tag_' . $tag->term_id ) : ''; 			// Get custom layout option 

// Archives templates
get_template_part(TW_TEMPLATES_DIR . '/template-archives'); 

// Theme footer
get_footer(); 