'A value' ] ); if(is_author()){ $author_id = get_the_author_meta('ID'); $author_name = get_the_author_meta('display_name'); $user_nicename = get_the_author_meta('user_nicename'); $author_description = get_the_author_meta('description', $author_id); $author_avatar = get_avatar_url( $author_id, array( 'size' => 450, 'default'=>'mystery', )); } $number_posts = 11; $offset_posts = (isset($_GET['offset'])) ? $_GET['offset'] : 0; $search_tags = (isset($_GET['tags'])) ? $_GET['tags'] : []; $total_blog_posts = wp_count_posts()->publish; $count_user_posts = count_user_posts( $author_id ); if ($offset_posts < 0) { $offset_posts = 0; } if (($offset_posts + 11) > $total_blog_posts) { $args = array( 'numberposts' => $number_posts, 'offset' => $total_blog_posts - 11, ); $offset_posts -= 11; } else { $args = array( 'numberposts' => $number_posts, 'offset' => $offset_posts, ); } $number_posts = count($posts); $telegram = get_the_author_meta( 'tumblr', $post->post_author ); $facebook = get_the_author_meta( 'facebook', $post->post_author ); $vk = get_the_author_meta( 'linkedin', $post->post_author ); $instagram = get_the_author_meta( 'instagram', $post->post_author ); $odnoklassniki = get_the_author_meta( 'myspace', $post->post_author ); $author_bio__links_list = ''; if(!empty($telegram)) { $author_bio__links_list .=' telegram '; } if(!empty($facebook)) { $author_bio__links_list .=' facebook '; } if(!empty($vk)) { $author_bio__links_list .=' vk '; } if(!empty($instagram)) { $author_bio__links_list .=' instagramm '; } if(!empty($odnoklassniki)) { $author_bio__links_list .=' ok '; } $uri = $_SERVER['REQUEST_URI']; $host=$_SERVER['HTTP_HOST']; // $complete_url = "http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; //To use whether HTTP OR HTTPS if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === "on"){ $htp = "https"; }else{ $htp = "http"; } $complete_url = "//".$host.$uri; var_dump('$uri = ' . $uri); var_dump('$host = ' . $host); ?>
Автор

Соц.сети автора:

'; } ?>
/"> /tag/slug ?>/">
slug; ?>
'post', 'posts_per_page' => $posts_per_page, 'paged' => $current, 'author' => $author_id, ] ); if ( $query->have_posts() ) { ?>

Текущая страница

have_posts() ) { $query->the_post(); echo get_template_part('blog-posts/blog-post-small'); echo '
'; } wp_reset_postdata(); echo wp_kses_post( paginate_links( [ 'total' => $query->max_num_pages, 'current' => $current, 'format' => '?page=%#%', 'base' => 'http://pamtest.ru'. $uri .'%_%', ] ) ); } else { global $wp_query; $wp_query->set_404(); status_header( 404 ); nocache_headers(); require get_404_template(); } ?>
= $numberposts):?>
Показать ещё