Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div class="grid-container grid-x">
- <div class="<?php if(is_active_sidebar('left-sidebar')) echo 'cell large-9'?> content page_content grid-x">
- <div class="small-12 category_title">
- <span class="h1"><i class="fa fa-ellipsis-h" aria-hidden="true"></i> <?php
- $category = get_the_category();
- echo $category[0]->cat_name;
- ?></span>
- <?php breadcrumbs(); ?>
- </div>
- <div class="content">
- <?php if ( have_posts() ) while ( have_posts() ) : the_post();?>
- <div class="cell small-12 meta">
- <h1><?php the_title();?></h1>
- <?php
- $autor= get_post_meta(get_the_id(),'author_select',true); //получаем переменную телефона с главной странице
- $authors = get_field('author_list', 'option');
- foreach ($authors as $key => $value) {
- if ($authors[$key]['fio'] == $autor) {
- $autor_url = $authors[$key]['author_page'];
- }
- }
- ?> <span class="date">Автор</span><span class="Autor" style="color: #007bff"><a href="<?=$autor_url;?>"><?php echo $autor; ?></a></span>
- <span class="date">Дата обновления: <?php the_time("d M"); ?></span>
- <?php /*<span class="comments_count"><?php echo get_comments_number()?><i class="fa fa-comments-o" aria-hidden="true"></i></span>
- <span class="post_views"><?php echo do_shortcode('[post-views]');?><i class="fa fa-eye" aria-hidden="true"></i></span> */ ?>
- </div>
- <div class="cell small-12">
- <?php the_content();?>
- </div>
- <div class="clearfix"></div>
- <div class="cell small-12 info_for_user">
- <div class="info"><?php socials_webnavoz_Plugin(); ?>
- Все материалы на сайте представлены только в ознакомительных целях и не являются инструкцией по самолечению. Обязательно обратитесь к врачу за квалифицированной медицинской помощью!!!
- </div>
- </div>
- <?php
- $post_id = get_the_ID();
- global $wpdb;
- $prefix = $wpdb->prefix;
- $table = $prefix.'site_authors';
- $table2 = $prefix.'authors_posts';
- $post_author_id = $wpdb->get_results("SELECT * FROM `".$table2."` WHERE `post_id`=$post_id", 'ARRAY_A');
- $post_author_id = $post_author_id[0]['author_id'];
- $author_info = $wpdb->get_results("SELECT * FROM `".$table."` WHERE `fio`='$post_author_id'", 'ARRAY_A');
- $author_info = $author_info[0];
- $name = $author_info['fio'];
- $author_posts = $wpdb->get_results("SELECT * FROM `".$table2."` WHERE `author_id`='$name'", 'ARRAY_A');
- if($post_author_id != ''){
- ?>
- <div class="author_box grid-x">
- <div class="title_box cell small-12 dgreen">
- <h4><i class="fa fa-pencil" aria-hidden="true"></i>Автор статьи</h4>
- </div>
- <div class="author_content grid-x align-middle cell small-12">
- <div class="cell small-12 medium-2 avatar">
- <div class="image" style="background-image: url('<?php echo $author_info['image']?>');"></div>
- </div>
- <div class="cell small-12 medium-3 author_name">
- <p class="name"><?php echo $author_info['fio']; ?></p>
- <span class="status">(<?php echo $author_info['position']; ?>)</span>
- </div>
- <div class="cell small-12 medium-3 author_meta">
- <p class="text"><i class="fa fa-address-card" aria-hidden="true"></i> <b>Стаж: </b><?php echo $author_info['stage']; ?></p>
- <p class="text"><i class="fa fa-folder" aria-hidden="true"></i> <b>Публикаций: </b><?php echo count($author_posts); ?></p>
- </div>
- <div class="cell small-12 medium-4 author_link">
- <a class="btn pink_btn read_more" href="<?php echo $author_info['author_page'] ?>">Подробнее <i class="fa fa-caret-right" aria-hidden="true"></i></a>
- </div>
- </div>
- </div>
- <?php
- }
- endwhile;?>
- <?php if (comments_open() || get_comments_number()) comments_template('', true);?>
- </div>
- </div>
- <?php get_sidebar();?>
- </div>
Add Comment
Please, Sign In to add comment