broker_ace_pages.php 2.51 KB
<?php
/*
 * Template Name: Broker ACE Pages
 */

global $user_ID;
get_currentuserinfo();
if (!$user_ID) {
    auth_redirect();
}
?>

<?php get_header("brokerlanding");

global $wpdb;

$currentTab = '';
if (isset($_GET['current_tab'])) {
    $currentTab = $_GET['current_tab'];
} else {
    $currentTab = 'ace_body_shop';
}

$bodyShopURL = home_url('/ace?current_tab=ace_body_shop');
$propertyContractorURL = home_url('/ace?current_tab=ace_property_contractor');

?>

<div id="brokercontent">
    <div class="row">
        <?php include_once 'broker_sidebar.php';?>
    </div>

    <div class="row">
        <?php include_once 'broker_sidebar_tab.php';?>
    </div>

    <div id="page-content">
        <h5 style="text-transform:uppercase;"><?php the_title();?></h5>
        <?php get_template_part('loop', 'single');?>
        <div class="ace-tabs ace-tabs-style-default" data-active="<?php echo $currentTab === 'ace_body_shop' ? '1' : '2' ?>">
            <div class="ace-tabs-nav">
                <a href="<?php echo $bodyShopURL; ?>" class="<?php echo $currentTab === 'ace_body_shop' ? 'ace-tabs-current' : '' ?>" data-target="self">ACE BODY SHOP</a>
                <a href="<?php echo $propertyContractorURL; ?>" class="<?php echo $currentTab === 'ace_property_contractor' ? 'ace-tabs-current' : '' ?>" data-target="self">ACE PROPERTY CONTRACTOR</a>
            </div>
            <div class="ace-tabs-panes">
                <div class="ace-tabs-pane ace-clearfix" style="<?php echo $currentTab === 'ace_body_shop' ? 'display:block;' : 'display:none;' ?>">
                    <?php
if ($currentTab === 'ace_body_shop') {
    echo do_shortcode('[wpsl category="ace_body_shop"]');
}
?>
                </div>
                <div class="ace-tabs-pane ace-clearfix" style="<?php echo $currentTab === 'ace_property_contractor' ? 'display:block;' : 'display:none;' ?>">
                    <?php
if ($currentTab === 'ace_property_contractor') {
    echo do_shortcode('[wpsl category="ace_property_contractor"]');
}
?>
                </div>
            </div>
        </div>

    </div>
    <?php
if (function_exists(clean_custom_menus())) {
    clean_custom_menus();
}
?>
</div>
<div class="new-footer-box">
<div  class="left-image-menu"><a href="<?php echo site_url(); ?>/lets-connect-info/"></a></div>
<?php wp_nav_menu(
    array(
        'theme_location' => 'broker-footer',
        'container' => 'nav',
        'container_id' => 'broker-footer',
    )
);

?>
</div>

<style>
    html {
        margin-top : 32px !important;
    }
</style>
<?php get_footer();?>