Created
May 28, 2019 08:40
-
-
Save kutoi94/a8dcdaab6ce9613d3588eea7ae8e6506 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<main id="Main"> | |
<div class="page-wrapper"> | |
<div class="container"> | |
<div class="row"> | |
<div id="menuBarleft" class="col-lg-3 col-sm-12"> | |
<div id="navbarNav" class="nav nav-tabs"> | |
<div id="v-pills-tab" class="nav flex-column nav-pills menu-left" role="tablist" aria-orientation="vertical"> | |
<?php $group_values = rwmb_meta( 'faq_tab' ); | |
$count = 0; | |
if ( ! empty( $group_values ) ) { | |
foreach ( $group_values as $group_value ) { | |
$count++; | |
$value = isset( $group_value['tab_name'] ) ? $group_value['tab_name'] : ''; ?> | |
<a id="v-pills-home-tab" class="<?php if($count ==1) echo 'active'; ?>" role="tab" href="#tab<?php echo $count; ?>" data-toggle="pill" aria-controls="tab<?php echo $count; ?>" aria-selected="true"><?php echo $value; ?> </a> | |
<?php } | |
} ?> | |
</div> | |
</div> | |
</div> | |
<div id="Content" class="col-lg-9 col-sm-12"> | |
<div id="v-pills-tabContent" class="tab-content"> | |
<?php $group_values = rwmb_meta( 'faq_tab' ); | |
$count_c = 0; | |
if ( ! empty( $group_values ) ) { | |
foreach ( $group_values as $group_value ) { | |
$count_c++; | |
$value = isset( $group_value['tab_name'] ) ? $group_value['tab_name'] : ''; | |
$group_childs = isset( $group_value['q_and_a'] ) ? $group_value['q_and_a'] : ''; ?> | |
<div id="tab<?php echo $count_c; ?>" class="tab-pane fade <?php if($count_c ==1) echo 'show active'; ?>" role="tabpanel" aria-labelledby="tab<?php echo $count_c; ?>-tab"> | |
<?php | |
$count_q = 0; | |
foreach ( $group_childs as $group_child ) { | |
$count_q++; | |
$question = isset( $group_child['question'] ) ? $group_child['question'] : ''; | |
$answer = isset( $group_child['answer'] ) ? $group_child['answer'] : ''; ?> | |
<div class="panel"> | |
<h4 class="panel-title"><a class="" href="#question-trip-<?php echo $count_q; ?>" data-toggle="collapse" aria-expanded="true"><?php echo $question; ?></a></h4> | |
<div class="panel-content"> | |
<div id="question-trip-<?php echo $count_q; ?>" class="question collapse show"> | |
<?php echo $answer; ?></a> | |
</div> | |
</div> | |
</div> | |
<?php } ?> | |
</div> | |
<?php } | |
} ?> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
</main> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment