HEX
Server: nginx/1.18.0
System: Linux vcwordpress 5.15.0-174-generic #184-Ubuntu SMP Fri Mar 13 18:41:50 UTC 2026 x86_64
User: root (0)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/stg-everycred.com/wp-content/themes/everycred/templates/page-faq.php
<?php /* Template name: Faq */
get_header();
$args = array(
    'post_type'=>'faqs',
    'posts_per_page'=> -1,
    'post_status' => 'publish',
    'order' => 'ASC'
);
$faqPosts = new WP_Query($args);
$faqCategories = get_terms(array (
    'taxonomy' => 'faq_category',
    'hide_empty' => false
));
$faq_choose_heading = get_field('faq_choose_heading'); 
?>
<div class="main-content">
    <section class="faq-questions py-120">
        <div class="container">
            <?php if(get_field('faq_sub_text')) { ?>
                <div class="font-16 text-bold text-center  text-blue"><?php echo get_field('faq_sub_text') ?></div>
            <?php }   if(get_field('faq_title')) { ?>    
                <div class="font-42 text-medium text-center text-black mt-2"><?php echo get_field('faq_title') ?></div>
            <?php }   if(get_field('faq_content')) { ?>     
                <div class="font-18 text-black text-center pt-3 pt-lg-4 description mx-auto">
                    <p><?php echo get_field('faq_content') ?></a></p>
                </div>
            <?php } ?>    
                <div class="tabs-box d-flex justify-content-center" data-aos="fade-up" data-aos-duration="800">
                    <button id="defaultOpen" class="tablinks d-flex align-items-center text-medium"
                        onclick="openCity(event, 'tab1')">
                        <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
                            <path
                                d="M0.923077 0C0.678269 2.44771e-05 0.443495 0.0972848 0.27039 0.27039C0.0972848 0.443495 2.44771e-05 0.678269 0 0.923077V23.0769C2.44771e-05 23.3217 0.0972848 23.5565 0.27039 23.7296C0.443495 23.9027 0.678269 24 0.923077 24H23.0769C23.3217 24 23.5565 23.9027 23.7296 23.7296C23.9027 23.5565 24 23.3217 24 23.0769V0.923077C24 0.678269 23.9027 0.443495 23.7296 0.27039C23.5565 0.0972848 23.3217 2.44771e-05 23.0769 0H0.923077ZM1.84615 1.84615H22.1538V22.1538H1.84615V1.84615Z" />
                            <path
                                d="M4.61839 3.69226C4.37358 3.69229 4.13881 3.78955 3.9657 3.96265C3.7926 4.13576 3.69534 4.37053 3.69531 4.61534V10.1538C3.69534 10.3986 3.7926 10.6334 3.9657 10.8065C4.13881 10.9796 4.37358 11.0769 4.61839 11.0769H10.1569C10.4017 11.0769 10.6364 10.9796 10.8095 10.8065C10.9826 10.6334 11.0799 10.3986 11.0799 10.1538V4.61534C11.0799 4.37053 10.9826 4.13576 10.8095 3.96265C10.6364 3.78955 10.4017 3.69229 10.1569 3.69226H4.61839Z" />
                            <path
                                d="M4.61839 12.9231C4.37358 12.9231 4.13881 13.0204 3.9657 13.1935C3.7926 13.3666 3.69534 13.6014 3.69531 13.8462V19.3846C3.69534 19.6294 3.7926 19.8642 3.9657 20.0373C4.13881 20.2104 4.37358 20.3077 4.61839 20.3077H10.1569C10.4017 20.3077 10.6364 20.2104 10.8095 20.0373C10.9826 19.8642 11.0799 19.6294 11.0799 19.3846V13.8462C11.0799 13.6014 10.9826 13.3666 10.8095 13.1935C10.6364 13.0204 10.4017 12.9231 10.1569 12.9231H4.61839Z" />
                            <path
                                d="M13.845 3.69226C13.6001 3.69229 13.3654 3.78955 13.1923 3.96265C13.0192 4.13576 12.9219 4.37053 12.9219 4.61534V10.1538C12.9219 10.3986 13.0192 10.6334 13.1923 10.8065C13.3654 10.9796 13.6001 11.0769 13.845 11.0769H19.3834C19.6282 11.0769 19.863 10.9796 20.0361 10.8065C20.2092 10.6334 20.3065 10.3986 20.3065 10.1538V4.61534C20.3065 4.37053 20.2092 4.13576 20.0361 3.96265C19.863 3.78955 19.6282 3.69229 19.3834 3.69226H13.845Z" />
                            <path
                                d="M13.845 12.9231C13.6001 12.9231 13.3654 13.0204 13.1923 13.1935C13.0192 13.3666 12.9219 13.6014 12.9219 13.8462V19.3846C12.9219 19.6294 13.0192 19.8642 13.1923 20.0373C13.3654 20.2104 13.6001 20.3077 13.845 20.3077H19.3834C19.6282 20.3077 19.863 20.2104 20.0361 20.0373C20.2092 19.8642 20.3065 19.6294 20.3065 19.3846V13.8462C20.3065 13.6014 20.2092 13.3666 20.0361 13.1935C19.863 13.0204 19.6282 12.9231 19.3834 12.9231H13.845Z" />
                        </svg>
                        All
                    </button>
                    
                    <?php 
                    foreach ($faqCategories as $faqCategory) { ?>
                            <button class="tablinks d-flex align-items-center text-medium" onclick="openCity(event, '<?php echo $faqCategory->slug; ?>')">
                                <?php echo get_field('category_icon', $faqCategory) ?>
                                <?php echo $faqCategory->name; ?>
                            </button>
                    <?php } ?>
                    
                </div>

                <div id="tab1" class="tabcontent">
                    <div class="accordion" id="accordionExample" data-aos="fade-up" data-aos-duration="800">
                        <?php 
                            if ($faqPosts->have_posts()) {
                                $count = 1;
                                while ($faqPosts->have_posts()) : $faqPosts->the_post(); 
                            ?>
                            <div class="accordion-item">
                                <<?php echo $faq_choose_heading;?> class="accordion-header" id="heading<?php echo $count; ?>">
                                    <button class="accordion-button font-18 text-medium collapsed" type="button" data-bs-toggle="collapse"
                                        data-bs-target="#collapse<?php echo $count; ?>" aria-expanded="true" aria-controls="collapse<?php echo $count; ?>">
                                        <?php echo  $count.'. '. get_the_title(); ?>
                                    </button>
                                </<?php echo $faq_choose_heading;?>>
                                <div id="collapse<?php echo $count; ?>" class="accordion-collapse collapse <?php if ($count == 1){ ?>show<?php } ?>" 
                                    aria-labelledby="heading<?php echo $count; ?>"
                                    data-bs-parent="#accordionExample">
                                    <div class="accordion-body font-18 text-start p-0">
                                        <?php echo get_the_content(); ?>
                                    </div>
                                </div>
                            </div>
                        <?php $count++; endwhile; wp_reset_postdata(); } ?>    
                    </div>
                </div>

            <?php foreach ($faqCategories as $faqCategory) {  
                $faq_args = array(
                    'post_type' => 'faqs',
                    'posts_per_page' => -1,
                    'order' => 'ASC',
                    'tax_query' => array(
                        array(
                            'taxonomy' => 'faq_category', // Custom taxonomy
                            'field'    => 'slug', 
                            'terms'    => $faqCategory->slug, // Current category slug
                        ),
                    ),
                );
                
                $faq_query = new WP_Query($faq_args);
                ?>
                <div id="<?php echo $faqCategory->slug ?>" class="tabcontent">
                    <div class="accordion" id="accordion-<?php echo $faqCategory->slug; ?>"  data-aos="fade-up" data-aos-duration="800">
                        <?php 
                            if ($faq_query->have_posts()) {
                                $count = 1;
                                while ($faq_query->have_posts()) : $faq_query->the_post(); 
                            ?>
                             <div class="accordion-item">
                                <h3 class="accordion-header" id="heading<?php echo $count . '-' . $faqCategory->slug; ?>">
                                    <button class="accordion-button font-18 text-medium <?php echo ($count === 1) ? '' : 'collapsed'; ?>"
                                     type="button" data-bs-toggle="collapse"
                                        data-bs-target="#collapse<?php echo $count . '-' . $faqCategory->slug; ?>" 
                                        aria-expanded="<?php echo ($count === 1) ? 'true' : 'false'; ?>"  aria-controls="collapse<?php echo $count; ?>"
                                        aria-controls="collapse<?php echo $count . '-' . $faqCategory->slug; ?>">
                                        
                                        <?php echo  $count.'. '. get_the_title(); ?>
                                    </button>
                                </h3>
                                <div id="collapse<?php echo $count . '-' . $faqCategory->slug; ?>" class="accordion-collapse collapse <?php echo ($count === 1) ? 'show' : ''; ?>" 
                                    aria-labelledby="heading<?php echo $count . '-' . $faqCategory->slug; ?>" 
                                    data-bs-parent="#accordion-<?php echo $faqCategory->slug; ?>">
                                    <div class="accordion-body font-18 text-start p-0">
                                        <?php the_content(); ?>
                                    </div>
                                </div>
                            </div>
                        <?php $count++;  endwhile; wp_reset_postdata(); } ?>    
                    </div>
                </div>
            <?php } ?>
            
        </div>
    </section>
    <section class="contact-section bg-white py-120">
        <div data-aos="fade-up" data-aos-duration="800">
            <div class="container">
                <div
                    class="d-flex justify-content-between align-items-start align-items-lg-center flex-column flex-lg-row">
                    <div class="content">
                        <?php
                    if (get_field('title_contact', 28)) { ?>
                        <div class="text-black font-42 text-medium">
                            <?php echo get_field('title_contact', 28); ?>
                        </div>
                        <?php }
                    if (get_field('description', 28)) { ?>
                        <div class="font-16 text-black text-medium mt-3">
                            <?php echo get_field('description', 28); ?>
                        </div>
                    </div>
                    <?php } if (get_field('button_url', 28)) { ?>
                    <a href="<?php echo get_field('button_url', 28); ?>"
                        class="mt-4 px-4 font-16 text-bold talk-btn black-btn d-flex align-items-center justify-content-center mx-0">Contact
                        Sales
                    </a>
                    <?php } ?>
                </div>
            </div>
        </div>
    </section>
</div>
<?php get_footer(); ?>