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/page-doctors.php
<?php 
$post_type = 'doctors';


$myposts  = get_posts( [
	'posts_per_page' => -1,
	'post_type' => $post_type,
	
] );



?>

<?php get_header(); ?>  
<?php get_template_part( 'template-parts/content_header', 'none' ); ?>  
<section class="section doctor_section">

	<div  class="site-main container">
          <div class="row doctor_row">
               <?php foreach($myposts as $mypost ): ?>
                    <?php $doc_id = $mypost->ID;
                         $doc_name       = get_field( 'name', $doc_id ); 
                         $doc_experience = get_field( 'experience', $doc_id ); 
                         $doc_speciality = get_field( 'speciality', $doc_id );
                         $doc_photo      = get_field( 'photo', $doc_id );
                         $doc_int        = get_field( 'International', $doc_id ); 
                         $doctor_show    = get_field( 'doctor_show', $doc_id ); 
                         $btn_show       = get_field( 'btn_show', $doc_id );  
                           
                         
                    ?> 
                    <?php if($doc_int):?>
                         
                    <?php else: ?>
                    <?php if($doctor_show): ?>                    
                         <?php else: ?>
                              <a href="<?php the_permalink($doc_id) ?>" >
                                   <div class="doctors__card pointer">
                                        <img src="<?php echo esc_html($doc_photo); ?>" alt="doctor">
                                        <p class="doctors__card-name"><?php echo esc_html($doc_name); ?></p>
                                        <p class="doctors__card-position"><?php echo esc_html($doc_speciality); ?></p>
                                        <p class="doctors__card-exp"><?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 echo esc_html($doc_experience); ?></p>
                                   </div>
                              </a>
                         <?php endif;?>     
                    <?php endif; ?>
               <?php endforeach; ?>
          </div>
          </div>
</section>
     <?php get_template_part( 'blocks/blocks' ); ?> 
<?php get_footer(); ?>