added share button on sigle post

This commit is contained in:
Fabiano Alencar 2018-08-13 16:40:31 -03:00
parent af00b584a0
commit 0d260f1e1d
2 changed files with 23 additions and 1 deletions

View File

@ -17,6 +17,10 @@
margin-top: -10px;
}
}
img {
height: 24px;
padding-left: 1rem;
}
}
img{
max-width: 100%;

View File

@ -1,7 +1,25 @@
<article role="article" id="post_<?php the_ID()?>" <?php post_class()?>>
<header class="mb-4">
<div class="header-meta text-muted mb-5">
<div class="header-meta text-muted mb-5 d-flex">
<?php tainacan_post_date(); ?> <?php printf(__('by %s', 'tainacan-theme'), get_the_author_posts_link()); ?>
<div class="btn-group ml-auto" role="group">
<?php if ( true == get_theme_mod( 'facebook_share', true ) ) : ?>
<a href="http://www.facebook.com/sharer.php?u=<?php the_permalink(); ?>" class="" target="_blank">
<img src="<?=get_template_directory_uri().'/assets/images/facebook-circle.png'; ?>" alt="">
</a>
<?php endif; ?>
<?php if ( true == get_theme_mod( 'twitter_share', true ) ) : ?>
<?php $via = !empty(get_option( 'twitter_user')) ? '&amp;via=' . get_option( 'twitter_user') : ''; ?>
<a href="http://twitter.com/share?url=<?php the_permalink(); ?>&amp;text=<?php the_title_attribute(); ?><?php echo $via; ?>" target="_blank" class="">
<img src="<?=get_template_directory_uri().'/assets/images/twitter-circle.png'; ?>" alt="">
</a>
<?php endif; ?>
<?php if ( true == get_theme_mod( 'google_share', true ) ) : ?>
<a href="https://plus.google.com/share?url=<?php the_permalink(); ?>" target="_blank" class="">
<img src="<?=get_template_directory_uri().'/assets/images/google-plus-circle.png'; ?>" alt="">
</a>
<?php endif; ?>
</div>
</div>
<?php the_post_thumbnail(); ?>
</header>