$limit_content_width = ' limit-width';
        }
    } else {
        if ($generic_content_full === 'limit') {
            $generic_custom_width = ot_get_option('_uncode_' . $post_type . '_layout_width_custom');
            if (is_array($generic_custom_width) && !empty($generic_custom_width)) {
                $page_custom_width = ' style="max-width: ' . implode("", $generic_custom_width) . ';"';
            }
        }
    }
}
/** Collect header data **/
$page_header_type = ot_get_option('_uncode_' . $post_type . '_header');
if ($page_header_type !== '' && $page_header_type !== 'none') {
    $metabox_data['_uncode_header_type'] = array($page_header_type);
    $meta_data = uncode_get_general_header_data($metabox_data, $post_type, '');
    $metabox_data = $meta_data['meta'];
    $show_title = $meta_data['show_title'];
}
/** Get layout info **/
$activate_sidebar = ot_get_option('_uncode_' . $post_type . '_activate_sidebar');
if ($activate_sidebar !== 'off') {
    $layout = ot_get_option('_uncode_' . $post_type . '_sidebar_position');
    if ($layout === '') {
        $layout = 'sidebar_right';
    }
    $sidebar = ot_get_option('_uncode_' . $post_type . '_sidebar');
    $sidebar_style = ot_get_option('_uncode_' . $post_type . '_sidebar_style');
    $sidebar_size = ot_get_option('_uncode_' . $post_type . '_sidebar_size');
    $sidebar_fill = ot_get_option('_uncode_' . $post_type . '_sidebar_fill');
    $sidebar_bg_color = ot_get_option('_uncode_' . $post_type . '_sidebar_bgcolor');
$media = get_post_meta($post->ID, '_uncode_featured_media', 1);
$media_display = get_post_meta($post->ID, '_uncode_featured_media_display', 1);
$featured_image = get_post_thumbnail_id($post->ID);
/** Collect header data **/
if (isset($metabox_data['_uncode_header_type'][0]) && $metabox_data['_uncode_header_type'][0] !== '') {
    $page_header_type = $metabox_data['_uncode_header_type'][0];
    if ($page_header_type !== 'none') {
        $meta_data = uncode_get_specific_header_data($metabox_data, $post_type, $featured_image);
        $metabox_data = $meta_data['meta'];
        $show_title = $meta_data['show_title'];
    }
} else {
    $page_header_type = ot_get_option('_uncode_' . $post_type . '_header');
    if ($page_header_type !== '' && $page_header_type !== 'none') {
        $metabox_data['_uncode_header_type'] = array($page_header_type);
        $meta_data = uncode_get_general_header_data($metabox_data, $post_type, $featured_image);
        $metabox_data = $meta_data['meta'];
        $show_title = $meta_data['show_title'];
    }
}
/** Get layout info **/
if (isset($metabox_data['_uncode_portfolio_active'][0]) && $metabox_data['_uncode_portfolio_active'][0] !== '') {
    /** Page specific info **/
    if ($metabox_data['_uncode_portfolio_active'][0] !== 'off') {
        $layout = isset($metabox_data['_uncode_portfolio_position'][0]) ? $metabox_data['_uncode_portfolio_position'][0] : '';
        $sidebar_size = isset($metabox_data['_uncode_portfolio_sidebar_size'][0]) ? $metabox_data['_uncode_portfolio_sidebar_size'][0] : 4;
        $sidebar_fill = isset($metabox_data['_uncode_portfolio_sidebar_fill'][0]) ? $metabox_data['_uncode_portfolio_sidebar_fill'][0] : '';
        $portfolio_style = isset($metabox_data['_uncode_portfolio_style'][0]) ? $metabox_data['_uncode_portfolio_style'][0] : $style;
        $portfolio_bg_color = isset($metabox_data['_uncode_portfolio_bgcolor'][0]) && $metabox_data['_uncode_portfolio_bgcolor'][0] !== '' ? ' style-' . $metabox_data['_uncode_portfolio_bgcolor'][0] . '-bg' : '';
    }
} else {
$limit_width = $limit_content_width = $the_content = $main_content = $partial_content = $media_shortcode = $page_header_type = $title_content = $page_class = '';
$show_title = true;
/** Get general datas **/
$style = ot_get_option('_uncode_general_style');
$bg_color = ot_get_option('_uncode_general_bg_color');
$bg_color = $bg_color == '' ? ' style-' . $style . '-bg' : ' style-' . $bg_color . '-bg';
/** Get page width info **/
$generic_content_full = ot_get_option('_uncode_404_layout_width');
if ($generic_content_full !== 'on') {
    $limit_width = ' limit-width';
}
/** Collect header data **/
$page_header_type = ot_get_option('_uncode_404_header');
if ($page_header_type !== 'none') {
    $metabox_data['_uncode_header_type'] = array($page_header_type);
    $meta_data = uncode_get_general_header_data($metabox_data, '404', '');
    $metabox_data = $meta_data['meta'];
    $show_title = $meta_data['show_title'];
    $page_header_title = ot_get_option('_uncode_404_header_title');
    $page_header_title_text = ot_get_option('_uncode_404_header_title_text');
    if ($page_header_title === 'off') {
        $page_header_title_text = '404';
    }
    $metabox_data['_uncode_header_title'] = array('on');
    $metabox_data['_uncode_header_title_custom'] = array('on');
    $metabox_data['_uncode_header_text'] = array($page_header_title_text);
    $page_header = new unheader($metabox_data, '');
    $header_html = $page_header->html;
    if ($header_html !== '') {
        echo '<div id="page-header">';
        echo do_shortcode(shortcode_unautop($page_header->html));