function om_wpb_detect($post) { global $_WPB_PAGE_SUPPORT_CUSTOM_ROW; $_WPB_PAGE_SUPPORT_CUSTOM_ROW = true; if (strcasecmp(substr(ltrim($post->post_content), 0, 7), '[vc_row') == 0) { om_body_add_class('om-wpb-active'); } else { om_body_remove_class('om-wpb-active'); } }
function om_body_styling_classes($classes) { if ($layout = get_option(OM_THEME_PREFIX . 'overall_layout')) { om_body_add_class('layout-' . $layout); } else { om_body_add_class('layout-wide'); } if (get_option(OM_THEME_PREFIX . 'sidebar_position') == 'left') { om_body_add_class('flip-sidebar'); } om_body_add_class('om-animation-enabled'); if (get_option(OM_THEME_PREFIX . 'no_animation_on_touch') == 'true') { om_body_add_class('om-no-animation-on-touch'); } if (get_option(OM_THEME_PREFIX . 'menu_highlight_active') == 'true') { om_body_add_class('primary-menu-highlight-active'); } om_body_add_class('menu-position-' . get_option(OM_THEME_PREFIX . 'menu_position')); if (get_option(OM_THEME_PREFIX . 'uncovering_footer') == 'true') { om_body_add_class('uncovering-footer'); } }
function om_custom_sidebar_setup($post_id) { if ($post_id) { if (get_post_type($post_id) == 'portfolio' && is_single($post_id) || in_array(get_post_meta($post_id, '_wp_page_template', true), array('template-portfolio.php', 'template-100width.php', 'template-content-only-100width.php', 'template-sitemap.php'))) { $sidebar_type = 'hide'; } else { $sidebar_type = get_post_meta($post_id, OM_THEME_SHORT_PREFIX . 'sidebar_show', true); } $sidebar_pos = get_post_meta($post_id, OM_THEME_SHORT_PREFIX . 'sidebar_custom_pos', true); } else { if (is_404() || is_search() || is_tax('portfolio-type')) { $sidebar_type = 'hide'; } else { $sidebar_type = ''; } $sidebar_pos = ''; } if ($sidebar_type == 'hide') { om_body_add_class('sidebar-hidden'); } else { om_body_add_class('sidebar-display'); } if ($sidebar_pos == 'left') { om_body_add_class('flip-sidebar'); } elseif ($sidebar_pos == 'right') { om_body_remove_class('flip-sidebar'); } }
<?php if (!function_exists('ompf_portfolio_archive_page')) { get_template_part('archive'); } else { $settings_page = get_option('ompf_archive_category_page_settings'); if ($settings_page && function_exists('icl_object_id')) { $settings_page = icl_object_id($settings_page, 'page', true); } $page_slider = om_get_page_slider($settings_page); om_custom_header_setup($settings_page); //om_custom_sidebar_setup($settings_page); om_custom_sidebar_setup(false); $full_width = get_post_meta($settings_page, 'ompf_portfolio_full_width', true); if ($full_width) { om_body_add_class('ompf-portfolio-full-width'); } get_header(); ?> <?php if (isset($page_slider) && $page_slider && $page_slider['layout'] != 'before_header') { om_tpl_header_slider($page_slider); } ?> <?php om_tpl_page_title($wp_query->queried_object->term_id, single_term_title('', false)); ?> <div class="content"> <div class="container"> <div class="container-inner">