HEX
Server: Apache/2.4.62 (Debian)
System: Linux plxsite 6.8.0-47-generic #47-Ubuntu SMP PREEMPT_DYNAMIC Fri Sep 27 21:40:26 UTC 2024 x86_64
User: root (0)
PHP: 8.1.30
Disabled: NONE
Upload Files
File: /var/www/html/wp-content/themes/polygant_2025/single.php
<?php

get_header('new');

$cur_id = get_the_ID();
$cat = get_the_category($cur_id);

// ID категории
$categ = $cat->term_id ; 

$categories = get_the_category();
$catiti = $categories[0]->term_id ;

?>

<section class="info-page">
  

    <div class="container">
        <div class="one-single-post-header">
            <div class="bread">
                   <p id="breadcrumbs"><span>
                       
                          <span>    <?php   $my_home_url = "/"; ?>
<a href="<?php echo $my_home_url; ?>" ><?php the_field('главная_название' ,  233 );?></a></span>
                       
                     <?php   $categories = get_the_category();

                       ?>
                        <?php 
                           if ( is_singular( 'blog' ) ){
    ?>
                          —    <span>   

                    <a href="<?php echo get_post_type_archive_link('blog'); ?>"><?php the_field('read_our_blog_copy' , 233 );?> </a>
                       </span>
                       <?php
}
                       ?>
                      
                       <?php
if ( ! empty( $categories ) ) {
    
    ?>
                         —    <span>    

                       <?php
    echo '<a href="' . esc_url( get_category_link( $categories[0]->term_id ) ) . '">' .the_field('основное_название_категории' , $categories[0] ) . '</a>';
    
    ?>
                       </span>
                             <?php
}
                       ?>
                     
                       
                       — <span class="breadcrumb_last" aria-current="page">   <?php the_title();?></span>
                       
                       </span></p>
                </div>
                        
             <h1 class="info-page__title">
                    <?php the_title(); ?>
                </h1>
            
                    
                        
                            
                        
                     <div class="info-page_meta_wrapper">
                  <div class="info-page_meta_autor-image"><?php echo get_avatar( get_the_author_meta('user_email') );  ?></div>
                      <div class="info-page_meta_autor-name">
                          <?php
                          $auth_id = get_the_author_ID();
                          $acf_id ='user_'.$auth_id;
                         
                                $aut_name = get_field( "aut_display_name_rus", $acf_id );
                            
                          $aut_link = get_author_posts_url($auth_id);
                          ?>
                          <a href="<?php echo $aut_link; ?>">
                          <div class="info-page_meta_autor-name-name"><?php echo $aut_name; ?></div>
                          <div class="info-page_meta_autor-name-descr"><?php the_author_meta( 'description' ); ?></div>
                          </a>
                 </div>
                      <div class="info-page_meta_about-article"><?php 
if (strtotime(get_the_date('Ymd'))<strtotime(get_the_modified_date('j F Y '))) {
  
    the_date('j F Y'); 
    ?>
                          <span > <span class="enbread">Updated on &nbsp;</span><span class="rubread">Обновлено &nbsp; </span>
                          
                          <?php

    the_modified_date(' j F Y'); 
    
    ?>
                    </span>   
                          <?php
    }
    else {

    the_date('j F Y');
        
        ?>
                          <span > <span class="enbread">Updated on &nbsp;</span><span class="rubread">Обновлено &nbsp; </span>
                          
                          <?php

    the_modified_date(' j F Y'); 
    
    ?>
                    </span>   
                          <?php
    }
?></div>
                         
                         
</div>
        
            
        </div>
        <div class="info-page__wrapper">
        

            <div class="info-page__main">


    <style>

.lang-en .button-show-pages-menuru {
display: none;
    }

.lang-ru .button-show-pages-menuen {
display: none;

    }
        .bread-two {
            display: none
        }
        .single-blog .bread-two {
            display: block;
        }
        .single-blog .bread-one {
            display: none;
        }
        .rubread , .enbread {
            display: none;
        }
        .lang-en .enbread {
            display: flex;
        }
        .lang-ru  .rubread{
                display: flex;
        }
        .lang-en .table-works__col  .enbread {
            display: inline;     color: #29292D;
        }
        .lang-ru  .table-works__col  .rubread{
                display: inline;     color: #29292D;
        }
        
</style>    
                
                     
                
                <?php if (have_posts()) : while (have_posts()) : the_post(); ?>

               
            

                <?php if ( has_excerpt() ) : ?>
                    <div class="info-page__excerpt">
                        <?php the_excerpt(); ?>
                    </div>
                <?php endif; ?>

                <div class="info-page__content content">

                    <?php the_content(); ?>

                    <?php $rateUsd = get_field('hourly_rate_usd'); ?>
                    <?php $rateEur = get_field('hourly_rate_eur'); ?>
                    <?php if ($rateUsd) : ?>
                        <div class="hourlyRate"> <span class="enbread">Hourly Rate:</span> <span class="rubread">Час работы: </span> <span><?php echo $rateUsd; ?> USD
                            <?php if ($rateEur) : ?>
                                (<?php echo $rateEur; ?> EUR)
                            <?php endif; ?></span>
                        </div>
                    <?php endif; ?>

                    <?php $developers = get_field('developers'); ?>

                    <?php if ($developers) : ?>
                        <div class="developers">
                            <?php foreach ($developers as $key => $post_id) : ?>
                                <?php $devImage = get_the_post_thumbnail_url($post_id, 'dev'); ?>
                                <?php $skill = get_field('skill', $post_id); ?>

                                <div class="developers-item">
                                    <div class="developers-item__img">
                                        <img src="<?php if ($devImage) { echo $devImage; } else { echo get_template_directory_uri() . '/img/devImg.jpg'; } ?>">
                                    </div>
                                    <div class="developers-item__info">
                                        <div class="developers-item__title">
                                            <?php echo get_the_title($post_id); ?>
                                                <?php if ($skill) : ?>,
                                                    <span>
                                                        <?php echo $skill; ?>
                                                    </span> 
                                                <?php endif; ?></div>
                                        <div class="developers-item__skills">
                                            <?php $skills = wp_get_post_terms($post_id, 'skill'); ?>
                                            <ul>
                                                <?php foreach ($skills as $key => $skill) : ?>
                                                    <li>
                                                        <?php echo $skill->name; ?>
                                                    </li>
                                                <?php endforeach; ?>
                                            </ul>
                                        </div>
                                        <div class="developers-item__content">
                                            <?php echo get_post_field('post_content', $post_id); ?>
                                        </div>
                                        <a href="#" data-popup="form" class="developers-item__btn">Hire Developer</a>
                                    </div>
                                </div>
                            <?php endforeach; ?>
                        </div>
                    <?php endif; ?>

                    <?php $text2 = get_field('text2'); ?>
                    <?php if ($text2) : ?>
                        <?php echo $text2; ?>
                    <?php endif; ?>

                    <?php $table_works = get_field('table_works'); ?>
                    <?php if ($table_works['table']) : ?>
                    <h4>
                        <?php echo $table_works['title']; ?>
                    </h4>
                        <div class="table-works">
                            <?php foreach ($table_works['table'] as $key => $item) : ?>
                                <?php $rate_usd = $item['rate_usd']; ?>
                                <?php $rate_eur = $item['rate_eur']; ?>
                                <div class="table-works__row">
                                    <div class="table-works__col"><?php echo $item['title']; ?></div>
                                    <div class="table-works__col"> <span class="enbread">Hourly Rate:</span> <span class="rubread">Час работы: </span> <span><?php echo $rate_usd; ?> USD
                                            <?php if ($rate_usd) { ?>(<?php echo $rate_eur; ?> EUR)<?php } ?></span></div>
                                </div>
                            <?php endforeach; ?>
                        </div>
                    <?php endif; ?>




 <div class="blog-item__meta" style="opacity: 0;">
                        
                        <div class="blog-item__el">
                            <div class="blog-item__el-icon">
                                <svg width="19" height="12" viewBox="0 0 19 12" fill="none" xmlns="http://www.w3.org/2000/svg">
                                    <g clip-path="url(#clip0_96_195)">
                                    <path d="M9.5 0C5.18182 0 1.49409 2.488 0 6C1.49409 9.512 5.18182 12 9.5 12C13.8182 12 17.5059 9.512 19 6C17.5059 2.488 13.8182 0 9.5 0ZM9.5 10C7.11636 10 5.18182 8.208 5.18182 6C5.18182 3.792 7.11636 2 9.5 2C11.8836 2 13.8182 3.792 13.8182 6C13.8182 8.208 11.8836 10 9.5 10ZM9.5 3.6C8.06636 3.6 6.90909 4.672 6.90909 6C6.90909 7.328 8.06636 8.4 9.5 8.4C10.9336 8.4 12.0909 7.328 12.0909 6C12.0909 4.672 10.9336 3.6 9.5 3.6Z" fill="#9CA1AB"/>
                                    </g>
                                    <defs>
                                    <clipPath id="clip0_96_195">
                                    <rect width="19" height="12" fill="white"/>
                                    </clipPath>
                                    </defs>
                                </svg>
                            </div>
                           
                        </div>
</div>
                

<?php if(is_singular('blog')) { ?>

<?php if( get_field("faq_-__верхний_заголовок") ): ?>

<?php $faqSchema = ''; ?>

<div class="section-faq-home-page article">
    <div class="container">
        <div class="container-faq-home">
            <div class="faq-home-left">
                <div class="more-article-about-theme"><?php the_field('faq_-__верхний_заголовок');?></div>
            </div>
            <div class="faq-home-right">
                <div class="daccordion2" id="daccordion2">
                                    
                <?php if(get_field('faq_вопрос_ответ')): ?>
                <?php while(has_sub_field('faq_вопрос_ответ')): ?>

                <?php $faqSchema .= '{
                    "@type": "Question",
                    "name": "'.get_sub_field('faq_-_вопрос').'",
                    "acceptedAnswer": {
                    "@type": "Answer",
                    "text": "'.get_sub_field('faq_-_ответ').'"
                } },'; ?>
        
                <div class="daccordion__item2">
                    <div class="daccordion__title2"><?php the_sub_field('faq_-_вопрос'); ?><div class="arrac"><svg width="15" height="15" viewBox="0 0 15 15" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="5.65625" y="12.728" width="10" height="2" rx="1" transform="rotate(-45 5.65625 12.728)" fill="#29292D"/><rect x="7.07031" y="0.000244141" width="10" height="2" rx="1" transform="rotate(45 7.07031 0.000244141)" fill="#29292D"/></svg> </div></div>
                    <div class="daccordion__content2"><?php the_sub_field('faq_-_ответ'); ?>
                    </div>
                </div>
            
            
                <?php endwhile; ?>
                <?php endif; ?>
                               
                <script type="application/ld+json">
                {
                "@context": "https://schema.org",
                "@type": "FAQPage",
                "mainEntity":[ 
                <?php echo rtrim($faqSchema,','); ?>
                ]
                }
                </script>                                       
                
                </div>
            </div>
        </div>
    </div>
</div>

<?php else :?>    
<?php endif; ?>
    

<div class="sample-posts">  
    <div class="more-article-about-theme rubread">Актуальные статьи: </div > 
    <div class="more-article-about-theme enbread">  Other Articles: </div>
<?php 
    $currentPost = get_the_ID();
$currentPost = array($currentPost);
$query = new WP_Query( [ 'post__not_in' => $currentPost , 'post_type' => 'blog',    'exclude' => $GLOBALS['post']->ID, 'posts_per_page' => 7] );

while ( $query->have_posts() ) {
  $query->the_post();
?>
                              <a href="<?php the_permalink() ?>" class="link-on-more-articles" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a>
                            <?php
}
    ?>
    

</div>
<?php   }
else { ?>
                    
<?php
$categories = get_the_category($post->ID);
if ($categories) {
  $category_ids = array();
  foreach($categories as $individual_category) $category_ids[] = $individual_category->term_id;
 
    $args=array(
      'category__in' => $category_ids, 
      'post__not_in' => array($post->ID), //Не выводить текущую запись
      'showposts'=>15, // Указываем сколько похожих записей выводить
      'caller_get_posts'=>1
    );
    $my_query = new wp_query($args);
    if( $my_query->have_posts() ) {
   ?>   <div class="sample-posts">  
    <div class="more-article-about-theme rubread">Похожие статьи:</div > 
    <div class="more-article-about-theme enbread">  Related Articles </div>
                    <?php
      while ($my_query->have_posts()) {
        $my_query->the_post();
?>
      <a href="<?php the_permalink() ?>" class="link-on-more-articles" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a>
<?php
      }
        ?>
                    </div>
                    <?php
    
    }
    wp_reset_query();
  }
?>
            <?php       }
                    ?>
  <?php 
                            wp_reset_postdata(); ?>
                </div>

                <div class="ya-share2 social-share" data-curtain data-lang="en" data-services="twitter,facebook,whatsapp,vkontakte,telegram"></div>

                <?php endwhile; endif; ?>
        
                
                
                
            </div>
            
            
            
                <div class="info-page__sidebar">
                    <div class="info-page__sidebar-inner">                   
                      <div class="content-heading-list-wrapper">
                          <?php echo do_shortcode('[ez-toc]');?>
                        </div>
                    </div>     
            </div>
            
            
        </div>
        
    </div>
</section>








<?php 

get_template_part('template-parts/contact-us-section');

?>
<?php get_footer('new'); ?>

          <script src="https://cdnjs.cloudflare.com/ajax/libs/sticky-sidebar/3.3.1/sticky-sidebar.min.js"></script>

<script> 


        var stickySidebar = new StickySidebar('.info-page__sidebar', {
            topSpacing: 100,
            bottomSpacing: 20,
            containerSelector: '.info-page__wrapper',
            innerWrapperSelector: '.info-page__sidebar-inner'
        });
    
</script>