HEX
Server: Apache
System: Linux srv-plesk28.ps.kz 5.14.0-284.18.1.el9_2.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Jun 29 17:06:27 EDT 2023 x86_64
User: greencl1 (10085)
PHP: 8.1.33
Disabled: apache_setenv,dl,eval,exec,openlog,passthru,pcntl_exec,pcntl_fork,popen,posix_getpwuid,posix_kill,posix_mkfifo,posix_setpgid,posix_setsid,posix_setuid,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,socket_create,socket_create_listen,socket_create_pair,syslog,system,socket_listen,stream_socket_server
Upload Files
File: /var/www/vhosts/greenclinic.kz/newsite/wp-content/themes/green-clinic/blocks/doctors.php
<?php  
  
  
  $list = get_sub_field('doctors_list');
  $btn = get_sub_field('btn');
  $btn_link = get_sub_field('btn_link');
?>



   
        <div class="container">
        <h2 class="section-title doctors-title wow animate__animated animate__fadeInLeft"><?php echo esc_html(the_sub_field('block_title')); ?></h2>
        
        <div class="doctors-slider owl-carousel wow animate__animated animate__fadeInLeft">
        <?php foreach($list as $list_item): ?>
            
            
            <?php 
            $doc_id = $list_item['doctor']->ID; 
                $photo = get_field('photo', $doc_id);
                if(empty($photo)){
                 $photo = '/wp-content/uploads/2024/02/doctor.webp';      
                }
              ?>
            <div class="doctors-slider-item">
                    <div class="doctor-slide-wrapp">
                        <a class="doctor-slide-img" href="<?php the_permalink($doc_id); ?>"><img src="<?php echo $photo; ?>" alt="<?php the_field('name', $doc_id); ?>"></a>
                        <div class="doctor-slide-name"><a style="text-decoration: none;"  href="<?php the_permalink($doc_id); ?>"><?php the_field('name', $doc_id); ?></a></div>
                        <div class="doctor-slide-profession"><?php the_field('speciality', $doc_id); ?></div>
                        <div class="doctor-slide-experience">
                          <?php 
                                // Get the current language
                                $current_language = wpm_get_language();

                                // Output the appropriate translation based on the current language
                                if ($current_language == 'en') {
                                echo 'Experience:';
                                } elseif ($current_language == 'kz') {
                                echo 'Еңбек өтілі:';
                                } else {
                                echo 'Стаж:'; // Default to Russian or the original language
                                }
                          ?>  
                          <?php the_field('experience', $doc_id); ?></div>
                    </div>
                </div>

        <?php endforeach;?>
        </div> 
        <?php if($btn): ?>
        <div class="button__container">
          <a href="<?php echo $btn_link; ?>"> 
            <button class="yellow-button"><?php echo $btn; ?></button>
          </a>
        </div>
        <?php endif ?>
        </div>