<?php
echo apply_filters( 'the_content', get_the_content($ID) );
?>
@media screen and (max-width:767px) {
}
@media screen and (min-width:768px) and (max-width:991px) {
}
@media screen and (min-width:992px) and (max-width:1199px) {
}
@media screen and (min-width: 1200px) {
}
server {
server_name example.com;
listen 80;
root /home/site1/web;
access_log /home/site1/logs/access.log;
error_log /home/site1/logs/error.log;
index index.php;
location / {
try_files $uri $uri/ /index.php?q=$uri&$args;
}
location ~* \.(jpg|jpeg|gif|css|png|js|ico|html)$ {
access_log off;
expires max;
}
location ~ /\.ht {
deny all;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/run/php/site1.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}
[site1]
user = site1
group = site1
listen = /run/php/site1.sock
listen.owner = www-data
listen.group = www-data
listen.mode = 0666
pm = ondemand
pm.max_children = 5
pm.process_idle_timeout = 10s
pm.max_requests = 200
chdir = /
<div class="table-title">
<h3>Статистика посещений за последний месяц c <?php echo date('d-m-Y', strtotime('-1 month')); ?> по <?php echo date("d-m-Y"); ?> из разных поисковых систем:</h3>
</div>
<table class="table-fill">
<thead>
<tr>
<th class="text-left">Откуда</th>
<th class="text-left">Количество визитов</th>
<th class="text-left">Показатель отказов</th>
</tr>
</thead>
<tbody class="table-hover">
<?php
$today=date("Ymd");
$month_ago=date('Ymd', strtotime('-1 month'));
$metrika_url = "http://api-metrika.yandex.ru/stat/sources/marketing.json?id=метрика&date1=$month_ago&date2=$today&sort=date&per_page=1000&oauth_token=токен";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $metrika_url);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
$metrika = curl_exec ($ch);
curl_close ($ch);
$metrika_o = json_decode($metrika,true);
foreach($metrika_o['data'] as $key=>$value){
echo "<tr><td class='text-left'>".$value['name']."</td><td class='text-left'>".$value['visits']."</td><td class='text-left'>".($value['denial']*100)."%</td></tr>";
}
?>
</tbody>
</table>
if($k%5 == 0) {
}
<main id="main" class="site-main" role="main">
<?php $k = 0;
if ( have_posts() ) : ?>
<?php /* Start the Loop */ ?>
<div class="posts-loop">
<?php while ( have_posts() ) : the_post(); ?>
<?php
/* Include the Post-Format-specific template for the content.
* If you want to override this in a child theme, then include a file
* called content-___.php (where ___ is the Post Format name) and that will be used instead.
*/
get_template_part( 'template-parts/' . $post_template );
?>
<?php endwhile; ?>
</div><!-- / .posts-loop -->
<div class="postnav">
<?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?>
</div>
<?php else : ?>
<?php get_template_part( 'template-parts/content', 'none' ); ?>
<?php endif; ?>
</main><!-- #main -->
<?php if($k%5 == 0){ post_class( 'list-post grid_item' );} else {post_class( 'list-post grid_item' );} ?>
Здесь вся информация постов и т.д.
</article>