add social share

This commit is contained in:
2021-10-09 22:59:32 +03:00
parent e9bc2dbd8b
commit 3619ce52d2
8 changed files with 18 additions and 7 deletions

View File

@@ -21,8 +21,8 @@ if( $posts ):
?>
<div class="right_archive">
<img width="280" class="right_archive_img" src="<?php echo get_the_post_thumbnail_url($post, 'left-thumb');?>" alt="<?the_title();?>">
<div class="right_archive_text">Читать газету<br>«Ветеринария и Жизнь»</div>
<a href="<?php the_permalink(); ?>"><img width="280" class="right_archive_img" src="<?php echo get_the_post_thumbnail_url($post, 'left-thumb');?>" alt="<?the_title();?>"></a>
<div class="right_archive_text"><a href="<?php the_permalink(); ?>">Читать газету<br>«Ветеринария и Жизнь»</a></div>
<div class="right_archive_link"><a href="<?php the_permalink(); ?>">cвежий номер</a></div>
</div>

1
blocks/social-share.php Normal file
View File

@@ -0,0 +1 @@
<a href="http://vk.com/share.php?url=<?=get_permalink()?>&<?=get_the_title()?>" target="_blank"><i class="fab fa-vk btn_soc_post"></i></a> <a href="https://www.facebook.com/sharer/sharer.php?u=#<?=get_permalink()?>" target="_blank"><i class="fab fa-facebook-square btn_soc_post"></i></a> <a href="https://telegram.me/share/url?url=<?=get_permalink()?>"><i class="fab fa-telegram-plane btn_soc_post"></i></a>

View File

@@ -28,7 +28,7 @@ $nn = 0;?>
<?if ( has_post_thumbnail() ) :?>
<a href="<?the_permalink();?>"><img class="card-img-top" src="<?php echo get_the_post_thumbnail_url(null, 'full'); ?>" alt="<?the_title();?>"></a>
<?endif?>
<h2 class="main-card-title-left"><a href="<?the_permalink();?>"><?the_title();?></a></h2>
<h2 class="main-card-title-right"><a href="<?the_permalink();?>"><?the_title();?></a></h2>
<div class="main-card-body">
<div class="main-card-text"><a href="<?the_permalink();?>"><?the_excerpt();?></a></div>
<div class="news_date"><?the_time('j F Y, G:i');?></div>

View File

@@ -26,7 +26,9 @@ $nn = 0;?>
<div class="main-card">
<?if ( has_post_thumbnail() ) :?>
<a href="<?the_permalink();?>"><img class="card-img-top" src="<?php echo get_the_post_thumbnail_url(null, 'full'); ?>" alt="<?the_title();?>"></a>
<div class="card-img-top">
<a href="<?the_permalink();?>"><img class="card-img-top" src="<?php echo get_the_post_thumbnail_url(null, 'full'); ?>" alt="<?the_title();?>"></a>
</div>
<?endif?>
<h2 class="main-card-title"><a href="<?the_permalink();?>"><?the_title();?></a></h2>
<div class="main-card-body">

View File

@@ -4,7 +4,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title><?php wp_title('|', true, 'right');?></title>
<link rel="stylesheet" href="<?php echo get_stylesheet_uri();?>?ver=12">
<link rel="stylesheet" href="<?php echo get_stylesheet_uri();?>?ver=13">
<link href="https://use.fontawesome.com/releases/v5.0.13/css/all.css" rel="stylesheet">
<script type='text/javascript' src="<?php echo get_stylesheet_directory_uri()?>/scripts/jquery-3.6.0.min.js"></script>
<script type='text/javascript' src="<?php echo get_stylesheet_directory_uri()?>/scripts/burger-menu.js?ver=9"></script>

View File

@@ -11,7 +11,7 @@ $nn = 0;?>
<?php $query = new WP_Query(
array(
'category_in' => array(2),
'category__in' => array(2),
'meta_query' => array(
array(
'key' => '_thumbnail_id',

View File

@@ -27,7 +27,7 @@
<span class="post_link_category"><a href="<?=$category_link?>"><?=$category['0']->name;?></a></span>, <?php the_time('j F Y, G:i');?>
</div>
<div class="post_info_sub post_info_social">
<i class="fab fa-vk btn_soc_post"></i> <i class="fab fa-facebook-square btn_soc_post"></i> <i class="fab fa-telegram-plane btn_soc_post"></i>
<?php include get_template_directory().'/blocks/social-share.php';?>
</div>
</div>
<h1 class="post-h1"><?php wp_title('');?></h1>

View File

@@ -1214,6 +1214,7 @@ img-fluid{
display: none;
}
.main-card-title{
font-size: 24px;
}
@@ -1365,6 +1366,10 @@ img-fluid{
display: none;
}
#footer-contact{
display: none;
}
#content{
margin: 8px;
width: 100%;
@@ -1405,6 +1410,9 @@ and (max-device-width : 667px) {
width: 100%;
}
#footer-contact{
display: none;
}
}